Changeset 685
- Timestamp:
- 02/06/07 02:13:36 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-menu-box.c
r588 r685 4 4 * Authored by Michael 'Mickey' Lauer <mlauer@vanille-media.de> 5 5 * 6 * Copyright (C) 2006 -2007 OpenMokoInc.6 * Copyright (C) 2006 First International Computer Inc. 7 7 * 8 8 * This program is free software; you can redistribute it and/or modify 9 9 * it under the terms of the GNU Lesser Public License as published by 10 * the Free Software Foundation; version 2 of the license.10 * the Free Software Foundation; version 2.1 of the license. 11 11 * 12 12 * This program is distributed in the hope that it will be useful, … … 173 173 { 174 174 moko_debug( "moko_menu_box_set_filter_menu" ); 175 GtkImageMenuItem* filtitem; 175 176 176 177 MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE(self); … … 180 181 gtk_widget_set_name( GTK_WIDGET(priv->menubar_r), "mokomenubox-filter-menubar" ); 181 182 gtk_box_pack_end( GTK_BOX(self), GTK_WIDGET(priv->menubar_r), TRUE, TRUE, 0 ); 182 } 183 GtkImageMenuItem* filtitem = gtk_image_menu_item_new_with_label( "Filter Menu" ); 184 GtkImage* filticon = gtk_image_new_from_stock( "openmoko-filter-menu-icon", GTK_ICON_SIZE_MENU ); 185 gtk_image_menu_item_set_image( filtitem, filticon ); 186 gtk_widget_set_name( GTK_WIDGET(filtitem), "transparent" ); 187 priv->filteritem = filtitem; 183 184 filtitem = gtk_image_menu_item_new_with_label( "Filter Menu" ); 185 GtkImage* filticon = gtk_image_new_from_stock( "openmoko-filter-menu-icon", GTK_ICON_SIZE_MENU ); 186 gtk_image_menu_item_set_image( filtitem, filticon ); 187 gtk_widget_set_name( GTK_WIDGET(filtitem), "transparent" ); 188 priv->filteritem = filtitem; 189 priv->filtermenu = menu; 190 gtk_menu_shell_append( GTK_MENU_BAR(priv->menubar_r), priv->filteritem ); 191 gtk_menu_item_set_submenu( priv->filteritem, priv->filtermenu ); 192 } 188 193 priv->filtermenu = menu; 189 g_signal_connect (G_OBJECT(menu), "selection_done", G_CALLBACK(cb_filter_menu_update), self ); 190 gtk_menu_item_set_submenu( filtitem, menu ); 191 gtk_menu_shell_append( GTK_MENU_BAR(priv->menubar_r), filtitem ); 192 194 gtk_menu_item_set_submenu( priv->filteritem, priv->filtermenu ); 195 g_signal_connect (G_OBJECT(menu), "selection_done", G_CALLBACK(cb_filter_menu_update), self ); 193 196 //FIXME hack to popup the first menu if user clicks on menubar 194 197 g_signal_connect( GTK_WIDGET(priv->menubar_r), "button-press-event", G_CALLBACK(cb_button_release), menu ); … … 234 237 g_warning( "moko_menu_box_set_active_filter: filter menu entry '%s' not found", text ); 235 238 } 239 240 GtkMenuItem* moko_menu_box_get_filter_item (MokoMenuBox* self) 241 { 242 MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE(self); 243 244 return priv->filteritem; 245 } 246
Note: See TracChangeset
for help on using the changeset viewer.
