[gnome-utils] [baobab] callback objects are now GtkActions



commit a14c9110b4cea649d993ee3915f3d7212e9b970b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Oct 27 17:01:47 2009 +0100

    [baobab] callback objects are now GtkActions
    
    With the GtkBuilder transition, some GtkMenuItem objects have been
    translated to GtkActions. Modify the callbacks accordingly.
    Fixes bug #589611.

 baobab/src/callbacks.c |   14 +++++++-------
 baobab/src/callbacks.h |    8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/baobab/src/callbacks.c b/baobab/src/callbacks.c
index 4e1074e..680159f 100644
--- a/baobab/src/callbacks.c
+++ b/baobab/src/callbacks.c
@@ -243,19 +243,19 @@ trash_dir_cb (GtkMenuItem *pmenu, gpointer dummy)
 }
 
 void
-on_pref_menu (GtkMenuItem *menuitem, gpointer user_data)
+on_pref_menu (GtkAction *a, gpointer user_data)
 {
 	create_props ();
 }
 
 void
-on_ck_allocated_activate (GtkCheckMenuItem *checkmenuitem,
+on_ck_allocated_activate (GtkToggleAction *action,
 			  gpointer user_data)
 {
 	if (!baobab.is_local)
 		return;
 
-	baobab.show_allocated = gtk_check_menu_item_get_active (checkmenuitem);
+	baobab.show_allocated = gtk_toggle_action_get_active (action);
 
 	baobab_treeview_show_allocated_size (baobab.tree_view,
 					     baobab.show_allocated);
@@ -269,12 +269,12 @@ on_ck_allocated_activate (GtkCheckMenuItem *checkmenuitem,
 }
 
 void
-on_view_tb_activate (GtkCheckMenuItem *checkmenuitem,
-                     gpointer          user_data) 
+on_view_tb_activate (GtkToggleAction *action,
+                     gpointer         user_data) 
 {
 	gboolean visible;
 
-	visible = gtk_check_menu_item_get_active (checkmenuitem);
+	visible = gtk_toggle_action_get_active (action);
 	set_toolbar_visible (visible);
 
 	gconf_client_set_bool (baobab.gconf_client,
@@ -299,7 +299,7 @@ on_view_sb_activate (GtkToggleAction *action,
 }
 
 void
-on_helpcontents_activate (GtkMenuItem *menuitem, gpointer user_data)
+on_helpcontents_activate (GtkAction *a, gpointer user_data)
 {
 	baobab_help_display (GTK_WINDOW (baobab.window), "baobab", NULL);
 }
diff --git a/baobab/src/callbacks.h b/baobab/src/callbacks.h
index f55bbe8..72aff34 100644
--- a/baobab/src/callbacks.h
+++ b/baobab/src/callbacks.h
@@ -45,13 +45,13 @@ void open_file_cb (GtkMenuItem *pmenu, gpointer dummy);
 void scan_folder_cb (GtkMenuItem *pmenu, gpointer dummy);
 void trash_dir_cb (GtkMenuItem *pmenu, gpointer dummy);
 void list_all_cb (GtkMenuItem *pmenu, gpointer dummy);
-void on_pref_menu (GtkMenuItem *menuitem, gpointer user_data);
+void on_pref_menu (GtkAction *a, gpointer user_data);
 void on_tb_scan_remote_clicked (GtkToolButton *toolbutton, gpointer user_data);
 void on_menu_scan_rem_activate (GtkMenuItem *menuitem, gpointer user_data);
-void on_view_tb_activate (GtkCheckMenuItem *checkmenuitem, gpointer user_data); 
+void on_view_tb_activate (GtkToggleAction *action, gpointer user_data); 
 void on_view_sb_activate (GtkToggleAction *action, gpointer         user_data);
-void on_ck_allocated_activate (GtkCheckMenuItem *checkmenuitem, gpointer user_data);
-void on_helpcontents_activate (GtkMenuItem *menuitem, gpointer user_data);
+void on_ck_allocated_activate (GtkToggleAction *action, gpointer user_data);
+void on_helpcontents_activate (GtkAction *a, gpointer user_data);
 void on_tv_selection_changed (GtkTreeSelection *selection, gpointer user_data);
 void on_chart_item_activated (BaobabChart *chart, GtkTreeIter *iter);
 gboolean on_chart_button_release (BaobabChart *chart, GdkEventButton *event, 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]