r22276 - gnucash/trunk/src/gnome-utils - Remove depreciated Option functions - part 3
Geert Janssens
gjanssens at code.gnucash.org
Wed Aug 1 09:54:19 EDT 2012
Author: gjanssens
Date: 2012-08-01 09:54:19 -0400 (Wed, 01 Aug 2012)
New Revision: 22276
Trac: http://svn.gnucash.org/trac/changeset/22276
Modified:
gnucash/trunk/src/gnome-utils/dialog-utils.c
gnucash/trunk/src/gnome-utils/dialog-utils.h
Log:
Remove depreciated Option functions - part 3
There were some more option menu functions in dialog-utils that I could
not find being used any where and this patch removes them.
Patch by Robert Fewell
Modified: gnucash/trunk/src/gnome-utils/dialog-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-utils.c 2012-08-01 13:54:10 UTC (rev 22275)
+++ gnucash/trunk/src/gnome-utils/dialog-utils.c 2012-08-01 13:54:19 UTC (rev 22276)
@@ -229,76 +229,6 @@
}
-void
-gnc_option_menu_init(GtkWidget * w)
-{
- GtkWidget * menu;
- GtkWidget * active;
- unsigned int i;
-
- menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(w));
-
- for (i = 0; i < g_list_length(GTK_MENU_SHELL(menu)->children); i++)
- {
- gtk_option_menu_set_history(GTK_OPTION_MENU(w), i);
- active = gtk_menu_get_active(GTK_MENU(menu));
- g_object_set_data(G_OBJECT(active),
- "option_index",
- GINT_TO_POINTER(i));
- }
-
- gtk_option_menu_set_history(GTK_OPTION_MENU(w), 0);
-}
-
-typedef struct
-{
- int i;
- GCallback f;
- gpointer cb_data;
-} menu_init_data;
-
-static void
-gnc_option_menu_set_one_item (gpointer loop_data, gpointer user_data)
-{
- GObject *item = G_OBJECT(loop_data);
- menu_init_data *args = (menu_init_data *) user_data;
-
- g_object_set_data(item, "option_index", GINT_TO_POINTER(args->i++));
- g_signal_connect(item, "activate", args->f, args->cb_data);
-}
-
-
-void
-gnc_option_menu_init_w_signal(GtkWidget * w, GCallback f, gpointer cb_data)
-{
- GtkWidget * menu;
- menu_init_data foo;
-
- foo.i = 0;
- foo.f = f;
- foo.cb_data = cb_data;
-
- menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(w));
- g_list_foreach(GTK_MENU_SHELL(menu)->children,
- gnc_option_menu_set_one_item, &foo);
- gtk_option_menu_set_history(GTK_OPTION_MENU(w), 0);
-}
-
-
-int
-gnc_option_menu_get_active(GtkWidget * w)
-{
- GtkWidget * menu;
- GtkWidget * menuitem;
-
- menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(w));
- menuitem = gtk_menu_get_active(GTK_MENU(menu));
-
- return GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menuitem),
- "option_index"));
-}
-
-
/********************************************************************\
* gnc_window_adjust_for_screen *
* adjust the window size if it is bigger than the screen size. *
Modified: gnucash/trunk/src/gnome-utils/dialog-utils.h
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-utils.h 2012-08-01 13:54:10 UTC (rev 22275)
+++ gnucash/trunk/src/gnome-utils/dialog-utils.h 2012-08-01 13:54:19 UTC (rev 22276)
@@ -57,12 +57,6 @@
void gnc_save_window_size (const char *section, GtkWindow *window);
-void gnc_option_menu_init (GtkWidget * option_menu);
-void gnc_option_menu_init_w_signal(GtkWidget * w,
- GCallback f,
- gpointer cb_data);
-int gnc_option_menu_get_active (GtkWidget * option_menu);
-
/********************************************************************\
* Adjust the window size if it is bigger than the screen size. *
* *
More information about the gnucash-changes
mailing list