changeset 2261:bdb2983612f0 trunk

[svn] - given some decent namespacing to playlist menus (part 1); removed last references to obsolete mainwin_accel
author giacomo
date Thu, 04 Jan 2007 05:29:13 -0800
parents 8960824f6706
children 99a0241f97bb
files ChangeLog audacious/ui_main.h audacious/ui_manager.c audacious/ui_manager.h audacious/ui_playlist.c
diffstat 5 files changed, 37 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jan 04 05:15:08 2007 -0800
+++ b/ChangeLog	Thu Jan 04 05:29:13 2007 -0800
@@ -1,3 +1,17 @@
+2007-01-04 13:15:08 +0000  Giacomo Lozito <james@develia.org>
+  revision [3525]
+  - ported ui_equalizer.c to ui_manager.c framework
+  trunk/audacious/ui/equalizer.ui |   36 +++---
+  trunk/audacious/ui/mainwin.ui   |    2 
+  trunk/audacious/ui/playlist.ui  |    2 
+  trunk/audacious/ui_equalizer.c  |  218 +++++-----------------------------------
+  trunk/audacious/ui_manager.c    |   85 ++++++++++++++-
+  trunk/audacious/ui_manager.h    |   10 +
+  trunk/audacious/ui_playlist.c   |    2 
+  trunk/audacious/ui_playlist.h   |    3 
+  8 files changed, 144 insertions(+), 214 deletions(-)
+
+
 2007-01-04 12:16:48 +0000  Giacomo Lozito <james@develia.org>
   revision [3523]
   - moved action_playlist_* implementation from ui_main.c to ui_playlist.c (more appropriate)
--- a/audacious/ui_main.h	Thu Jan 04 05:15:08 2007 -0800
+++ b/audacious/ui_main.h	Thu Jan 04 05:29:13 2007 -0800
@@ -95,8 +95,6 @@
 extern GtkWidget *err;
 extern GdkGC *mainwin_gc;
 
-extern GtkAccelGroup *mainwin_accel;
-
 extern gboolean mainwin_moving;
 extern gboolean mainwin_focus;
 
--- a/audacious/ui_manager.c	Thu Jan 04 05:15:08 2007 -0800
+++ b/audacious/ui_manager.c	Thu Jan 04 05:29:13 2007 -0800
@@ -24,8 +24,10 @@
 #include "actions-playlist.h"
 #include "actions-equalizer.h"
 
+/* TODO ui_main.h is only included because ui_manager.c needs the values of
+   TimerMode enum; move that enum elsewhere so we can get rid of this include */
 #include "ui_main.h"
-#include "ui_playlist.h"
+
 #include "icons-stock.h"
 #include "widgets/widgetcore.h"
 
@@ -659,11 +661,11 @@
 
   playlistwin_popup_menu = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/playlist-rightclick-menu");
 
-  pladd_menu  = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/add-menu");
-  pldel_menu  = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/del-menu");
-  plsel_menu  = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/select-menu");
-  plsort_menu = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/misc-menu");
-  pllist_menu = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/playlist-menu");
+  playlistwin_pladd_menu  = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/add-menu");
+  playlistwin_pldel_menu  = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/del-menu");
+  playlistwin_plsel_menu  = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/select-menu");
+  playlistwin_plsort_menu = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/misc-menu");
+  playlistwin_pllist_menu = ui_manager_get_popup_menu(ui_manager, "/playlist-menus/playlist-menu");
 
   gtk_ui_manager_add_ui_from_file( ui_manager , DATA_DIR "/ui/equalizer.ui" , &gerr );
 
--- a/audacious/ui_manager.h	Thu Jan 04 05:15:08 2007 -0800
+++ b/audacious/ui_manager.h	Thu Jan 04 05:29:13 2007 -0800
@@ -31,11 +31,11 @@
 GtkWidget *mainwin_playlist_menu;
 GtkWidget *mainwin_view_menu;
 
-GtkWidget *pladd_menu;
-GtkWidget *pldel_menu;
-GtkWidget *plsel_menu;
-GtkWidget *plsort_menu;
-GtkWidget *pllist_menu;
+GtkWidget *playlistwin_pladd_menu;
+GtkWidget *playlistwin_pldel_menu;
+GtkWidget *playlistwin_plsel_menu;
+GtkWidget *playlistwin_plsort_menu;
+GtkWidget *playlistwin_pllist_menu;
 GtkWidget *playlistwin_popup_menu;
 
 GtkWidget *equalizerwin_presets_menu;
--- a/audacious/ui_playlist.c	Thu Jan 04 05:15:08 2007 -0800
+++ b/audacious/ui_playlist.c	Thu Jan 04 05:29:13 2007 -0800
@@ -83,9 +83,6 @@
 static gboolean playlistwin_select_search_kp_cb( GtkWidget *entry , GdkEventKey *event ,
                                                  gpointer searchdlg_win );
 
-GtkWidget *pladd_menu, *pldel_menu, *plsel_menu, *plsort_menu, *pllist_menu;
-GtkWidget *playlistwin_popup_menu;
-
 static void playlistwin_draw_frame(void);
 
 
@@ -1069,8 +1066,8 @@
     }
     else if (event->button == 1 && REGION_L(12, 37, 29, 11)) {
         /* ADD button menu */
-        gtk_widget_size_request(pladd_menu, &req);
-        ui_manager_popup_menu_show(GTK_MENU(pladd_menu),
+        gtk_widget_size_request(playlistwin_pladd_menu, &req);
+        ui_manager_popup_menu_show(GTK_MENU(playlistwin_pladd_menu),
                    xpos + 12,
                    (ypos + playlistwin_get_height()) - 8 - req.height,
                    event->button,
@@ -1079,8 +1076,8 @@
     }
     else if (event->button == 1 && REGION_L(41, 66, 29, 11)) {
         /* SUB button menu */
-        gtk_widget_size_request(pldel_menu, &req);
-        ui_manager_popup_menu_show(GTK_MENU(pldel_menu),
+        gtk_widget_size_request(playlistwin_pldel_menu, &req);
+        ui_manager_popup_menu_show(GTK_MENU(playlistwin_pldel_menu),
                    xpos + 40,
                    (ypos + playlistwin_get_height()) - 8 - req.height,
                    event->button,
@@ -1089,8 +1086,8 @@
     }
     else if (event->button == 1 && REGION_L(70, 95, 29, 11)) {
         /* SEL button menu */
-        gtk_widget_size_request(plsel_menu, &req);
-        ui_manager_popup_menu_show(GTK_MENU(plsel_menu),
+        gtk_widget_size_request(playlistwin_plsel_menu, &req);
+        ui_manager_popup_menu_show(GTK_MENU(playlistwin_plsel_menu),
                    xpos + 68,
                    (ypos + playlistwin_get_height()) - 8 - req.height,
                    event->button,
@@ -1099,8 +1096,8 @@
     }
     else if (event->button == 1 && REGION_L(99, 124, 29, 11)) {
         /* MISC button menu */
-        gtk_widget_size_request(plsort_menu, &req);
-        ui_manager_popup_menu_show(GTK_MENU(plsort_menu),
+        gtk_widget_size_request(playlistwin_plsort_menu, &req);
+        ui_manager_popup_menu_show(GTK_MENU(playlistwin_plsort_menu),
                    xpos + 100,
                    (ypos + playlistwin_get_height()) - 8 - req.height,
                    event->button,
@@ -1109,8 +1106,8 @@
     }
     else if (event->button == 1 && REGION_R(46, 23, 29, 11)) {
         /* LIST button menu */
-        gtk_widget_size_request(pllist_menu, &req);
-        ui_manager_popup_menu_show(GTK_MENU(pllist_menu),
+        gtk_widget_size_request(playlistwin_pllist_menu, &req);
+        ui_manager_popup_menu_show(GTK_MENU(playlistwin_pllist_menu),
                    xpos + playlistwin_get_width() - req.width - 12,
                    (ypos + playlistwin_get_height()) - 8 - req.height,
                    event->button,