comparison audacious/equalizer.c @ 2232:ac2ea05e60a0 trunk

[svn] - migration from gtkitemfactory to actions and uimanager; main menu has been ported, still much work and test to do
author giacomo
date Tue, 02 Jan 2007 16:48:38 -0800
parents 86f0443d0de2
children
comparison
equal deleted inserted replaced
2231:86f0443d0de2 2232:ac2ea05e60a0
38 #include "widgets/widgetcore.h" 38 #include "widgets/widgetcore.h"
39 #include "dock.h" 39 #include "dock.h"
40 #include "hints.h" 40 #include "hints.h"
41 #include "input.h" 41 #include "input.h"
42 #include "main.h" 42 #include "main.h"
43 #include "ui_manager.h"
43 #include "playlist.h" 44 #include "playlist.h"
44 #include "ui_playlist.h" 45 #include "ui_playlist.h"
45 #include "util.h" 46 #include "util.h"
46 #include "output.h" 47 #include "output.h"
47 48
275 } 276 }
276 277
277 static void 278 static void
278 equalizerwin_set_shade(gboolean shaded) 279 equalizerwin_set_shade(gboolean shaded)
279 { 280 {
280 GtkWidget *widget; 281 GtkAction *action = gtk_action_group_get_action(
281 widget = gtk_item_factory_get_widget(mainwin_view_menu, 282 mainwin_toggleaction_group_others , "roll up equalizer" );
282 "/Roll up Equalizer"); 283 gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(action) , shaded );
283 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), shaded);
284 } 284 }
285 285
286 static void 286 static void
287 equalizerwin_shade_toggle(void) 287 equalizerwin_shade_toggle(void)
288 { 288 {
505 widget_contains(WIDGET(equalizerwin_auto), event->x, event->y))) { 505 widget_contains(WIDGET(equalizerwin_auto), event->x, event->y))) {
506 /* 506 /*
507 * Pop up the main menu a few pixels down to avoid 507 * Pop up the main menu a few pixels down to avoid
508 * anything to be selected initially. 508 * anything to be selected initially.
509 */ 509 */
510 util_item_factory_popup(mainwin_general_menu, event->x_root, 510 ui_manager_popup_menu_show(GTK_MENU(mainwin_general_menu), event->x_root,
511 event->y_root + 2, 3, event->time); 511 event->y_root + 2, 3, event->time);
512 grab = FALSE; 512 grab = FALSE;
513 } 513 }
514 else { 514 else {
515 handle_press_cb(equalizerwin_wlist, widget, event); 515 handle_press_cb(equalizerwin_wlist, widget, event);
1007 1007
1008 1008
1009 void 1009 void
1010 equalizerwin_show(gboolean show) 1010 equalizerwin_show(gboolean show)
1011 { 1011 {
1012 GtkWidget *item = gtk_item_factory_get_widget(mainwin_view_menu, 1012 GtkAction *action = gtk_action_group_get_action(
1013 "/Show Equalizer"); 1013 mainwin_toggleaction_group_others , "show equalizer" );
1014 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), show); 1014 gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(action) , show );
1015 } 1015 }
1016 1016
1017 void 1017 void
1018 equalizerwin_real_show(void) 1018 equalizerwin_real_show(void)
1019 { 1019 {