Mercurial > audlegacy
changeset 2235:72d593e5d7e4 trunk
[svn] - remove everything relating to GtkItemFactory.
author | nenolod |
---|---|
date | Tue, 02 Jan 2007 21:52:19 -0800 |
parents | ba07fe36bfb4 |
children | ae7c17c4ef8b |
files | ChangeLog audacious/mainwin.h audacious/util.c audacious/util.h |
diffstat | 4 files changed, 7 insertions(+), 117 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jan 02 17:28:38 2007 -0800 +++ b/ChangeLog Tue Jan 02 21:52:19 2007 -0800 @@ -1,3 +1,10 @@ +2007-01-03 01:28:38 +0000 Giacomo Lozito <james@develia.org> + revision [3473] + - ensure that popup menus are always fully displayed + trunk/audacious/ui_manager.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + + 2007-01-03 00:56:11 +0000 Giacomo Lozito <james@develia.org> revision [3471] - add missing header actions-mainwin.h
--- a/audacious/mainwin.h Tue Jan 02 17:28:38 2007 -0800 +++ b/audacious/mainwin.h Tue Jan 02 21:52:19 2007 -0800 @@ -102,12 +102,6 @@ extern GtkWidget *mainwin_jtf; -/* -extern GtkItemFactory *mainwin_general_menu; -extern GtkItemFactory *mainwin_vis_menu; -extern GtkItemFactory *mainwin_play_menu, *mainwin_view_menu; -*/ - extern TextBox *mainwin_stime_min, *mainwin_stime_sec; extern TextBox *mainwin_info; extern TButton *mainwin_shuffle, *mainwin_repeat, *mainwin_eq, *mainwin_pl;
--- a/audacious/util.c Tue Jan 02 17:28:38 2007 -0800 +++ b/audacious/util.c Tue Jan 02 21:52:19 2007 -0800 @@ -570,73 +570,6 @@ *y = CLAMP(pos->y - 2, 0, MAX(0, screen_height - requisition.height)); } -static void -util_menu_delete_popup_data(GtkObject * object, GtkItemFactory * ifactory) -{ - gtk_signal_disconnect_by_func(object, - GTK_SIGNAL_FUNC - (util_menu_delete_popup_data), ifactory); - gtk_object_remove_data_by_id(GTK_OBJECT(ifactory), quark_popup_data); -} - - -/* - * util_item_factory_popup[_with_data]() is a replacement for - * gtk_item_factory_popup[_with_data](). - * - * The difference is that the menu is always popped up whithin the - * screen. This means it does not neccesarily pop up at (x,y). - */ - -void -util_item_factory_popup_with_data(GtkItemFactory * ifactory, - gpointer data, - GtkDestroyNotify destroy, guint x, - guint y, guint mouse_button, guint32 time) -{ - static GQuark quark_user_menu_pos = 0; - MenuPos *pos; - - if (!quark_user_menu_pos) - quark_user_menu_pos = g_quark_from_static_string("user_menu_pos"); - - if (!quark_popup_data) - quark_popup_data = - g_quark_from_static_string("GtkItemFactory-popup-data"); - - pos = g_object_get_qdata(G_OBJECT(ifactory), quark_user_menu_pos); - if (!pos) { - pos = g_new0(MenuPos, 1); - - g_object_set_qdata_full(G_OBJECT(ifactory->widget), - quark_user_menu_pos, pos, g_free); - } - pos->x = x; - pos->y = y; - - - if (data != NULL) { - g_object_set_qdata_full(G_OBJECT(ifactory), - quark_popup_data, data, destroy); - g_signal_connect(G_OBJECT(ifactory->widget), - "selection-done", - G_CALLBACK(util_menu_delete_popup_data), ifactory); - } - - gtk_menu_popup(GTK_MENU(ifactory->widget), NULL, NULL, - (GtkMenuPositionFunc) util_menu_position, - pos, mouse_button, time); -} - -void -util_item_factory_popup(GtkItemFactory * ifactory, guint x, guint y, - guint mouse_button, guint32 time) -{ - util_item_factory_popup_with_data(ifactory, NULL, NULL, x, y, - mouse_button, time); -} - - #define URL_HISTORY_MAX_SIZE 30 static void @@ -1453,35 +1386,6 @@ return dialog; } - -GtkItemFactory * -create_menu(GtkItemFactoryEntry *entries, - guint n_entries, - GtkAccelGroup *accel) -{ - GtkItemFactory *menu; - - menu = gtk_item_factory_new(GTK_TYPE_MENU, "<Main>", accel); - gtk_item_factory_set_translate_func(menu, bmp_menu_translate, NULL, - NULL); - gtk_item_factory_create_items(menu, n_entries, entries, NULL); - - return menu; -} - - -void -make_submenu(GtkItemFactory *menu, - const gchar *item_path, - GtkItemFactory *submenu) -{ - GtkWidget *item, *menu_; - - item = gtk_item_factory_get_widget(menu, item_path); - menu_ = gtk_item_factory_get_widget(submenu, ""); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), menu_); -} - /* * Resizes a GDK pixmap. */
--- a/audacious/util.h Tue Jan 02 17:28:38 2007 -0800 +++ b/audacious/util.h Tue Jan 02 21:52:19 2007 -0800 @@ -58,13 +58,6 @@ void glist_movedown(GList * list); void glist_moveup(GList * list); -void util_item_factory_popup(GtkItemFactory * ifactory, guint x, guint y, - guint mouse_button, guint32 time); -void util_item_factory_popup_with_data(GtkItemFactory * ifactory, - gpointer data, - GtkDestroyNotify destroy, guint x, - guint y, guint mouse_button, - guint32 time); GtkWidget *util_add_url_dialog_new(const gchar * caption, GCallback ok_func, GCallback enqueue_func); void util_menu_position(GtkMenu * menu, gint * x, gint * y, @@ -106,14 +99,6 @@ # define bmp_menu_translate NULL #endif -GtkItemFactory *create_menu(GtkItemFactoryEntry *entries, - guint n_entries, - GtkAccelGroup *accel); - -void make_submenu(GtkItemFactory *menu, - const gchar *item_path, - GtkItemFactory *submenu); - GtkWidget *make_filebrowser(const gchar * title, gboolean save);