[nautilus-actions] Fix NACT run
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Fix NACT run
- Date: Sat, 18 Dec 2010 21:09:44 +0000 (UTC)
commit 7151360e10b7f83e18b2a0f2709d901f53f4000e
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu Dec 16 21:13:43 2010 +0100
Fix NACT run
But the layout seems at least awful :(
ChangeLog | 22 ++++++++
m4/na-check-module.m4 | 4 +-
run-autogen.sh | 1 +
src/nact/nact-gtk-utils.c | 8 ++-
src/nact/nact-gtk-utils.h | 2 +-
src/nact/nact-iaction-tab.c | 79 ++++++++++++++++++-----------
src/nact/nact-ibasenames-tab.c | 2 +-
src/nact/nact-icommand-tab.c | 12 ++--
src/nact/nact-ienvironment-tab.c | 22 ++++----
src/nact/nact-iexecution-tab.c | 14 +++---
src/nact/nact-ifolders-tab.c | 2 +-
src/nact/nact-iproperties-tab.c | 8 ++--
src/nact/nact-ischemes-tab.c | 2 +-
src/nact/nact-match-list.c | 6 +-
src/nact/nact-schemes-list.c | 4 +-
src/nact/nautilus-actions-config-tool.ui | 40 +++++++--------
16 files changed, 136 insertions(+), 92 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fc54bb5..7019fa8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
2010-12-16 Pierre Wieser <pwieser trychlos org>
+ * m4/na-check-module.m4: Fix variable substitution.
+
+ * run-autogen.sh: Re-enable silent rules in Gtk+-3 build.
+
+ * src/nact/nact-gtk-utils.c:
+ * src/nact/nact-gtk-utils.h (nact_gtk_utils_set_editable):
+ * src/nact/nact-iaction-tab.c (on_tab_updatable_selection_changed):
+ * src/nact/nact-ibasenames-tab.c (on_tab_updatable_selection_changed):
+ * src/nact/nact-icommand-tab.c (on_tab_updatable_selection_changed):
+ * src/nact/nact-ienvironment-tab.c (on_tab_updatable_selection_changed):
+ * src/nact/nact-iexecution-tab.c (on_tab_updatable_selection_changed):
+ * src/nact/nact-ifolders-tab.c (on_tab_updatable_selection_changed):
+ * src/nact/nact-iproperties-tab.c (on_tab_updatable_selection_changed):
+ * src/nact/nact-ischemes-tab.c (on_tab_updatable_selection_changed):
+ * src/nact/nact-match-list.c (nact_match_list_on_selection_changed):
+ * src/nact/nact-schemes-list.c (nact_schemes_list_create_model):
+ Use GObject instead of GtkWidget parameter.
+
+ * src/nact/nact-iaction-tab.c
+ (nact_iaction_tab_runtime_init_toplevel):
+ Dynamicallu allocates the GtkComboBox or the GtkComboBoxEntry.
+
* configure.ac: Build with Gtk+ 3.0 if first found by pkg-config.
* run-autogen.sh: Setup PKG_CONFIG_PATH and LD_LIBRARY_PATH
diff --git a/m4/na-check-module.m4 b/m4/na-check-module.m4
index 8e12258..ed0f626 100644
--- a/m4/na-check-module.m4
+++ b/m4/na-check-module.m4
@@ -47,8 +47,8 @@ AC_DEFUN([NA_CHECK_MODULE],[
fi
fi
- NAUTILUS_ACTIONS_CFLAGS="${NAUTILUS_ACTIONS_CFLAGS} $1_CFLAGS"
- NAUTILUS_ACTIONS_LIBS="${NAUTILUS_ACTIONS_LIBS} $1_LIBS"
+ NAUTILUS_ACTIONS_CFLAGS="${NAUTILUS_ACTIONS_CFLAGS} ${$1_CFLAGS}"
+ NAUTILUS_ACTIONS_LIBS="${NAUTILUS_ACTIONS_LIBS} ${$1_LIBS}"
else
AC_MSG_ERROR([condition $2 not satisfied])
fi
diff --git a/run-autogen.sh b/run-autogen.sh
index 704984b..0fa6631 100755
--- a/run-autogen.sh
+++ b/run-autogen.sh
@@ -30,4 +30,5 @@ LD_LIBRARY_PATH=/home/pierre/.local/jhbuild/lib \
exec ./autogen.sh \
--prefix=/home/pierre/.local/jhbuild \
--with-nautilus-extdir=/home/pierre/.local/jhbuild/lib/nautilus \
+ --enable-silent-rules \
--disable-schemas-install
diff --git a/src/nact/nact-gtk-utils.c b/src/nact/nact-gtk-utils.c
index 864a0d1..2c7f7b5 100644
--- a/src/nact/nact-gtk-utils.c
+++ b/src/nact/nact-gtk-utils.c
@@ -52,9 +52,13 @@
* @editable: whether the @widget is editable or not.
*
* Try to set a visual indication of whether the @widget is editable or not.
+ *
+ * Having a GtkWidget should be enough, but we also deal with a GtkTreeViewColumn.
+ * So the most-bottom common ancestor is just GObject (since GtkObject having been
+ * deprecated in Gtk+-3.0)
*/
void
-nact_gtk_utils_set_editable( GtkWidget *widget, gboolean editable )
+nact_gtk_utils_set_editable( GObject *widget, gboolean editable )
{
GList *renderers, *irender;
@@ -63,7 +67,7 @@ nact_gtk_utils_set_editable( GtkWidget *widget, gboolean editable )
* while 'has_entry' property exists since 2.24
*/
#if(( GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION >= 3 )
- if( gtk_combo_box_get_has_entry( GTK_COMBO_BOX( widget ))){
+ if( GTK_IS_COMBO_BOX( widget ) && gtk_combo_box_get_has_entry( GTK_COMBO_BOX( widget ))){
#else
if( GTK_IS_COMBO_BOX_ENTRY( widget )){
#endif
diff --git a/src/nact/nact-gtk-utils.h b/src/nact/nact-gtk-utils.h
index cd5f399..0ce8c97 100644
--- a/src/nact/nact-gtk-utils.h
+++ b/src/nact/nact-gtk-utils.h
@@ -43,7 +43,7 @@
G_BEGIN_DECLS
-void nact_gtk_utils_set_editable( GtkWidget *widget, gboolean editable );
+void nact_gtk_utils_set_editable( GObject *widget, gboolean editable );
void nact_gtk_utils_set_initial_state ( GtkToggleButton *button, GCallback func );
void nact_gtk_utils_reset_initial_state( GtkToggleButton *button, GCallback func, void *data, gboolean active );
diff --git a/src/nact/nact-iaction-tab.c b/src/nact/nact-iaction-tab.c
index b1eab8b..d9b06dd 100644
--- a/src/nact/nact-iaction-tab.c
+++ b/src/nact/nact-iaction-tab.c
@@ -113,6 +113,7 @@ static void icon_preview_cb( GtkFileChooser *dialog, GtkWidget *preview
static gint sort_stock_ids( gconstpointer a, gconstpointer b );
static gchar *strip_underscore( const gchar *text );
static void release_icon_combobox( NactIActionTab *instance );
+static GtkWidget *get_icon_combo_box( NactIActionTab *instance );
GType
nact_iaction_tab_get_type( void )
@@ -192,21 +193,24 @@ interface_base_finalize( NactIActionTabInterface *klass )
* GTK_ICON_SIZE_DIALOG : 48x48
*
* icon is rendered for GTK_ICON_SIZE_MENU (na_object_item_get_pixbuf)
+ *
+ * Starting with 3.0.3, the ComboBox is dynamically created into its container.
*/
void
nact_iaction_tab_initial_load_toplevel( NactIActionTab *instance )
{
static const gchar *thisfn = "nact_iaction_tab_initial_load_toplevel";
- GtkWidget *icon_widget;
- GtkTreeModel *model;
- GtkButton *button;
GtkFrame *frame;
+ GtkButton *button;
gint size;
#if(( GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 91 ) || GTK_MAJOR_VERSION >= 3 )
GtkRequisition minimal_size, natural_size;
#else
GtkRequisition requisition;
#endif
+ GtkWidget *container;
+ GtkWidget *icon_combo;
+ GtkTreeModel *model;
g_return_if_fail( NACT_IS_IACTION_TAB( instance ));
@@ -218,27 +222,30 @@ nact_iaction_tab_initial_load_toplevel( NactIActionTab *instance )
frame = GTK_FRAME( base_window_get_widget( BASE_WINDOW( instance ), "ActionIconFrame" ));
#if(( GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 91 ) || GTK_MAJOR_VERSION >= 3 )
gtk_widget_get_preferred_size( GTK_WIDGET( button ), &minimal_size, &natural_size );
- size = MAX( minimal_size.height, natural_size.height ) - 4;
+ size = MAX( minimal_size.height, natural_size.height );
#else
gtk_widget_size_request( GTK_WIDGET( button ), &requisition );
- g_debug( "%s: button requisition width=%d, height=%d", thisfn, requisition.width, requisition.height );
- size = requisition.height - 4;
+ size = requisition.height;
#endif
gtk_widget_set_size_request( GTK_WIDGET( frame ), size, size );
gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN );
- icon_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionIconComboBoxEntry" );
model = create_stock_icon_model();
- gtk_combo_box_set_model( GTK_COMBO_BOX( icon_widget ), model );
+#if(( GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION >= 3 )
+ icon_combo = gtk_combo_box_new_with_model_and_entry( model );
+#else
+ icon_combo = gtk_combo_box_entry_new_with_model( model );
+#endif
g_object_unref( model );
+ container = base_window_get_widget( BASE_WINDOW( instance ), "ActionIconHBox" );
+ gtk_box_pack_start( GTK_BOX( container ), icon_combo, TRUE, TRUE, 0 );
#if(( GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION >= 3 )
- icon_combo_list_set_entry( GTK_COMBO_BOX( icon_widget ));
+ icon_combo_list_set_entry( GTK_COMBO_BOX( icon_combo ));
#else
- icon_combo_list_set_entry( GTK_COMBO_BOX_ENTRY( icon_widget ));
+ icon_combo_list_set_entry( GTK_COMBO_BOX_ENTRY( icon_combo ));
#endif
-
- icon_combo_list_set_layout( GTK_COMBO_BOX( icon_widget ));
+ icon_combo_list_set_layout( GTK_COMBO_BOX( icon_combo ));
}
}
@@ -316,7 +323,7 @@ nact_iaction_tab_runtime_init_toplevel( NactIActionTab *instance )
"changed",
G_CALLBACK( on_tooltip_changed ));
- icon_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionIconComboBoxEntry" );
+ icon_widget = get_icon_combo_box( instance );
base_window_signal_connect(
BASE_WINDOW( instance ),
G_OBJECT( gtk_bin_get_child( GTK_BIN( icon_widget ))),
@@ -457,12 +464,12 @@ on_tab_updatable_selection_changed( NactIActionTab *instance, gint count_selecte
toggle = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( instance ), "ActionTargetSelectionButton" ));
gtk_toggle_button_set_active( toggle, target_selection || ( item && NA_IS_OBJECT_MENU( item )));
gtk_widget_set_sensitive( GTK_WIDGET( toggle ), item && NA_IS_OBJECT_ACTION( item ));
- nact_gtk_utils_set_editable( GTK_WIDGET( toggle ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( toggle ), editable );
toggle = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( instance ), "ActionTargetLocationButton" ));
gtk_toggle_button_set_active( toggle, target_location || ( item && NA_IS_OBJECT_MENU( item )));
gtk_widget_set_sensitive( GTK_WIDGET( toggle ), item && NA_IS_OBJECT_ACTION( item ));
- nact_gtk_utils_set_editable( GTK_WIDGET( toggle ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( toggle ), editable );
enable_label = target_selection || target_location || ( item && NA_IS_OBJECT_MENU( item ));
label_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionMenuLabelEntry" );
@@ -474,25 +481,25 @@ on_tab_updatable_selection_changed( NactIActionTab *instance, gint count_selecte
}
g_free( label );
gtk_widget_set_sensitive( label_widget, enable_label );
- nact_gtk_utils_set_editable( GTK_WIDGET( label_widget ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( label_widget ), editable );
toggle = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( instance ), "ActionTargetToolbarButton" ));
gtk_toggle_button_set_active( toggle, target_toolbar );
gtk_widget_set_sensitive( GTK_WIDGET( toggle ), item && NA_IS_OBJECT_ACTION( item ));
- nact_gtk_utils_set_editable( GTK_WIDGET( toggle ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( toggle ), editable );
toggle = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( instance ), "ToolbarSameLabelButton" ));
same_label = item && NA_IS_OBJECT_ACTION( item ) ? na_object_is_toolbar_same_label( item ) : FALSE;
gtk_toggle_button_set_active( toggle, same_label );
gtk_widget_set_sensitive( GTK_WIDGET( toggle ), target_toolbar );
- nact_gtk_utils_set_editable( GTK_WIDGET( toggle ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( toggle ), editable );
label_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionToolbarLabelEntry" );
label = item && NA_IS_OBJECT_ACTION( item ) ? na_object_get_toolbar_label( item ) : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( label_widget ), label );
g_free( label );
gtk_widget_set_sensitive( label_widget, target_toolbar && !same_label );
- nact_gtk_utils_set_editable( GTK_WIDGET( label_widget ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( label_widget ), editable );
label_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionToolbarLabelLabel" );
gtk_widget_set_sensitive( label_widget, target_toolbar && !same_label );
@@ -502,17 +509,17 @@ on_tab_updatable_selection_changed( NactIActionTab *instance, gint count_selecte
tooltip = tooltip ? tooltip : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( tooltip_widget ), tooltip );
g_free( tooltip );
- nact_gtk_utils_set_editable( GTK_WIDGET( tooltip_widget ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( tooltip_widget ), editable );
- icon_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionIconComboBoxEntry" );
+ icon_widget = get_icon_combo_box( instance );
icon = item ? na_object_get_icon( item ) : g_strdup( "" );
icon = icon ? icon : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( gtk_bin_get_child( GTK_BIN( icon_widget ))), icon );
g_free( icon );
- nact_gtk_utils_set_editable( GTK_WIDGET( icon_widget ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( icon_widget ), editable );
icon_button = GTK_BUTTON( base_window_get_widget( BASE_WINDOW( instance ), "ActionIconBrowseButton" ));
- nact_gtk_utils_set_editable( GTK_WIDGET( icon_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( icon_button ), editable );
st_on_selection_change = FALSE;
}
@@ -918,14 +925,15 @@ icon_combo_list_set_layout( GtkComboBox *combo )
static void
on_icon_browse( GtkButton *button, NactIActionTab *instance )
{
- GtkWidget *icon_widget;
-
- icon_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionIconComboBoxEntry" );
-
nact_gtk_utils_select_file_with_preview(
BASE_WINDOW( instance ),
- _( "Choosing an icon" ), IPREFS_ICONS_DIALOG,
- gtk_bin_get_child( GTK_BIN( icon_widget )), IPREFS_ICONS_PATH, "", G_CALLBACK( icon_preview_cb ));
+ _( "Choosing an icon" ),
+ IPREFS_ICONS_DIALOG,
+ gtk_bin_get_child( GTK_BIN( get_icon_combo_box( instance ))),
+ IPREFS_ICONS_PATH,
+ "",
+ G_CALLBACK( icon_preview_cb )
+ );
}
static void
@@ -1036,7 +1044,18 @@ release_icon_combobox( NactIActionTab *instance )
GtkWidget *combo;
GtkTreeModel *model;
- combo = base_window_get_widget( BASE_WINDOW( instance ), "ActionIconComboBoxEntry" );
+ combo = get_icon_combo_box( instance );
model = gtk_combo_box_get_model( GTK_COMBO_BOX( combo ));
gtk_list_store_clear( GTK_LIST_STORE( model ));
}
+
+static GtkWidget *
+get_icon_combo_box( NactIActionTab *instance )
+{
+ GtkWidget *icon_box, *icon_combo;
+
+ icon_box = base_window_get_widget( BASE_WINDOW( instance ), "ActionIconHBox" );
+ icon_combo = GTK_WIDGET( gtk_container_get_children( GTK_CONTAINER( icon_box ))->data );
+
+ return( icon_combo );
+}
diff --git a/src/nact/nact-ibasenames-tab.c b/src/nact/nact-ibasenames-tab.c
index 54cacf9..c082fe1 100644
--- a/src/nact/nact-ibasenames-tab.c
+++ b/src/nact/nact-ibasenames-tab.c
@@ -256,7 +256,7 @@ on_tab_updatable_selection_changed( BaseWindow *window, gint count_selected )
matchcase_button = GTK_TOGGLE_BUTTON( base_window_get_widget( window, "BasenamesMatchcaseButton" ));
matchcase = context ? na_object_get_matchcase( context ) : FALSE;
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( matchcase_button ), matchcase );
- nact_gtk_utils_set_editable( GTK_WIDGET( matchcase_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( matchcase_button ), editable );
st_on_selection_change = FALSE;
}
diff --git a/src/nact/nact-icommand-tab.c b/src/nact/nact-icommand-tab.c
index 99a0696..254cd18 100644
--- a/src/nact/nact-icommand-tab.c
+++ b/src/nact/nact-icommand-tab.c
@@ -386,7 +386,7 @@ on_tab_updatable_selection_changed( NactICommandTab *instance, gint count_select
gtk_entry_set_text( GTK_ENTRY( label_entry ), label );
g_free( label );
gtk_widget_set_sensitive( label_entry, profile != NULL );
- nact_gtk_utils_set_editable( GTK_WIDGET( label_entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( label_entry ), editable );
path_entry = get_path_entry( instance );
path = profile ? na_object_get_path( profile ) : g_strdup( "" );
@@ -394,11 +394,11 @@ on_tab_updatable_selection_changed( NactICommandTab *instance, gint count_select
gtk_entry_set_text( GTK_ENTRY( path_entry ), path );
g_free( path );
gtk_widget_set_sensitive( path_entry, profile != NULL );
- nact_gtk_utils_set_editable( GTK_WIDGET( path_entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( path_entry ), editable );
path_button = get_path_button( instance );
gtk_widget_set_sensitive( GTK_WIDGET( path_button ), profile != NULL );
- nact_gtk_utils_set_editable( GTK_WIDGET( path_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( path_button ), editable );
parameters_entry = get_parameters_entry( instance );
parameters = profile ? na_object_get_parameters( profile ) : g_strdup( "" );
@@ -406,7 +406,7 @@ on_tab_updatable_selection_changed( NactICommandTab *instance, gint count_select
gtk_entry_set_text( GTK_ENTRY( parameters_entry ), parameters );
g_free( parameters );
gtk_widget_set_sensitive( parameters_entry, profile != NULL );
- nact_gtk_utils_set_editable( GTK_WIDGET( parameters_entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( parameters_entry ), editable );
legend_button = get_legend_button( instance );
gtk_widget_set_sensitive( GTK_WIDGET( legend_button ), profile != NULL );
@@ -419,11 +419,11 @@ on_tab_updatable_selection_changed( NactICommandTab *instance, gint count_select
gtk_entry_set_text( GTK_ENTRY( wdir_entry ), wdir );
g_free( wdir );
gtk_widget_set_sensitive( wdir_entry, profile != NULL );
- nact_gtk_utils_set_editable( GTK_WIDGET( wdir_entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( wdir_entry ), editable );
wdir_button = GTK_BUTTON( base_window_get_widget( BASE_WINDOW( instance ), "CommandWorkingDirectoryButton" ));
gtk_widget_set_sensitive( GTK_WIDGET( wdir_button ), profile != NULL );
- nact_gtk_utils_set_editable( GTK_WIDGET( wdir_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( wdir_button ), editable );
st_on_selection_change = FALSE;
}
diff --git a/src/nact/nact-ienvironment-tab.c b/src/nact/nact-ienvironment-tab.c
index a745fdd..bead619 100644
--- a/src/nact/nact-ienvironment-tab.c
+++ b/src/nact/nact-ienvironment-tab.c
@@ -431,23 +431,23 @@ on_tab_updatable_selection_changed( NactIEnvironmentTab *instance, gint count_se
g_free( sel_count );
combo = base_window_get_widget( BASE_WINDOW( instance ), "SelectionCountSigneCombobox" );
- nact_gtk_utils_set_editable( GTK_WIDGET( combo ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( combo ), editable );
entry = base_window_get_widget( BASE_WINDOW( instance ), "SelectionCountNumberEntry" );
- nact_gtk_utils_set_editable( GTK_WIDGET( entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( entry ), editable );
/* desktop environment
*/
raz_desktop_listview( instance );
always_button = base_window_get_widget( BASE_WINDOW( instance ), "ShowAlwaysButton" );
- nact_gtk_utils_set_editable( GTK_WIDGET( always_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( always_button ), editable );
show_button = base_window_get_widget( BASE_WINDOW( instance ), "OnlyShowButton" );
- nact_gtk_utils_set_editable( GTK_WIDGET( show_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( show_button ), editable );
notshow_button = base_window_get_widget( BASE_WINDOW( instance ), "DoNotShowButton" );
- nact_gtk_utils_set_editable( GTK_WIDGET( notshow_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( notshow_button ), editable );
desktops = context ? na_object_get_only_show_in( context ) : NULL;
listview = GTK_TREE_VIEW( base_window_get_widget( BASE_WINDOW( instance ), "EnvironmentsDesktopTreeView" ));
@@ -480,34 +480,34 @@ on_tab_updatable_selection_changed( NactIEnvironmentTab *instance, gint count_se
text = text && strlen( text ) ? text : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( entry ), text );
g_free( text );
- nact_gtk_utils_set_editable( GTK_WIDGET( entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( entry ), editable );
browse_button = base_window_get_widget( BASE_WINDOW( instance ), "TryExecButton" );
- nact_gtk_utils_set_editable( GTK_WIDGET( browse_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( browse_button ), editable );
entry = base_window_get_widget( BASE_WINDOW( instance ), "ShowIfRegisteredEntry" );
text = context ? na_object_get_show_if_registered( context ) : g_strdup( "" );
text = text && strlen( text ) ? text : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( entry ), text );
g_free( text );
- nact_gtk_utils_set_editable( GTK_WIDGET( entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( entry ), editable );
entry = base_window_get_widget( BASE_WINDOW( instance ), "ShowIfTrueEntry" );
text = context ? na_object_get_show_if_true( context ) : g_strdup( "" );
text = text && strlen( text ) ? text : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( entry ), text );
g_free( text );
- nact_gtk_utils_set_editable( GTK_WIDGET( entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( entry ), editable );
entry = base_window_get_widget( BASE_WINDOW( instance ), "ShowIfRunningEntry" );
text = context ? na_object_get_show_if_running( context ) : g_strdup( "" );
text = text && strlen( text ) ? text : g_strdup( "" );
gtk_entry_set_text( GTK_ENTRY( entry ), text );
g_free( text );
- nact_gtk_utils_set_editable( GTK_WIDGET( entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( entry ), editable );
browse_button = base_window_get_widget( BASE_WINDOW( instance ), "ShowIfRunningButton" );
- nact_gtk_utils_set_editable( GTK_WIDGET( browse_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( browse_button ), editable );
st_on_selection_change = FALSE;
diff --git a/src/nact/nact-iexecution-tab.c b/src/nact/nact-iexecution-tab.c
index b8d0550..7960c27 100644
--- a/src/nact/nact-iexecution-tab.c
+++ b/src/nact/nact-iexecution-tab.c
@@ -293,16 +293,16 @@ on_tab_updatable_selection_changed( NactIExecutionTab *instance, gint count_sele
st_on_selection_change = TRUE;
normal_toggle = base_window_get_widget( BASE_WINDOW( instance ), "ExecutionModeNormal" );
- nact_gtk_utils_set_editable( GTK_WIDGET( normal_toggle ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( normal_toggle ), editable );
terminal_toggle = base_window_get_widget( BASE_WINDOW( instance ), "ExecutionModeTerminal" );
- nact_gtk_utils_set_editable( GTK_WIDGET( terminal_toggle ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( terminal_toggle ), editable );
embedded_toggle = base_window_get_widget( BASE_WINDOW( instance ), "ExecutionModeEmbedded" );
- nact_gtk_utils_set_editable( GTK_WIDGET( embedded_toggle ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( embedded_toggle ), editable );
display_toggle = base_window_get_widget( BASE_WINDOW( instance ), "ExecutionModeDisplayOutput" );
- nact_gtk_utils_set_editable( GTK_WIDGET( display_toggle ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( display_toggle ), editable );
mode = profile ? na_object_get_execution_mode( profile ) : g_strdup( "Normal" );
gtk_toggle_button_set_inconsistent( GTK_TOGGLE_BUTTON( normal_toggle ), profile == NULL );
@@ -327,19 +327,19 @@ on_tab_updatable_selection_changed( NactIExecutionTab *instance, gint count_sele
notify = profile ? na_object_get_startup_notify( profile ) : FALSE;
notify_check = base_window_get_widget( BASE_WINDOW( instance ), "StartupNotifyButton" );
- nact_gtk_utils_set_editable( GTK_WIDGET( notify_check ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( notify_check ), editable );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( notify_check ), notify );
class = profile ? na_object_get_startup_class( profile ) : g_strdup( "" );
entry = base_window_get_widget( BASE_WINDOW( instance ), "StartupWMClassEntry" );
gtk_entry_set_text( GTK_ENTRY( entry ), class );
- nact_gtk_utils_set_editable( GTK_WIDGET( entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( entry ), editable );
g_free( class );
user = profile ? na_object_get_execute_as( profile ) : g_strdup( "" );
entry = base_window_get_widget( BASE_WINDOW( instance ), "ExecuteAsEntry" );
gtk_entry_set_text( GTK_ENTRY( entry ), user );
- nact_gtk_utils_set_editable( GTK_WIDGET( entry ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( entry ), editable );
g_free( user );
st_on_selection_change = FALSE;
diff --git a/src/nact/nact-ifolders-tab.c b/src/nact/nact-ifolders-tab.c
index 9a040e0..c073e89 100644
--- a/src/nact/nact-ifolders-tab.c
+++ b/src/nact/nact-ifolders-tab.c
@@ -239,7 +239,7 @@ on_tab_updatable_selection_changed( NactIFoldersTab *instance, gint count_select
context = nact_main_tab_get_context( NACT_MAIN_WINDOW( instance ), &editable );
button = base_window_get_widget( BASE_WINDOW( instance ), "FolderBrowseButton" );
- nact_gtk_utils_set_editable( GTK_WIDGET( button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( button ), editable );
}
static void
diff --git a/src/nact/nact-iproperties-tab.c b/src/nact/nact-iproperties-tab.c
index 05afbff..ce8d235 100644
--- a/src/nact/nact-iproperties-tab.c
+++ b/src/nact/nact-iproperties-tab.c
@@ -286,14 +286,14 @@ on_tab_updatable_selection_changed( NactIPropertiesTab *instance, gint count_sel
enabled_button = get_enabled_button( instance );
enabled_item = item ? na_object_is_enabled( NA_OBJECT_ITEM( item )) : FALSE;
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( enabled_button ), enabled_item );
- nact_gtk_utils_set_editable( GTK_WIDGET( enabled_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( enabled_button ), editable );
label_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionDescriptionText" );
buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW( label_widget ));
label = item ? na_object_get_description( item ) : g_strdup( "" );
gtk_text_buffer_set_text( buffer, label, -1 );
g_free( label );
- nact_gtk_utils_set_editable( GTK_WIDGET( label_widget ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( label_widget ), editable );
shortcut_button = base_window_get_widget( BASE_WINDOW( instance ), "SuggestedShortcutButton" );
shortcut = item ? na_object_get_shortcut( item ) : g_strdup( "" );
@@ -303,7 +303,7 @@ on_tab_updatable_selection_changed( NactIPropertiesTab *instance, gint count_sel
}
gtk_button_set_label( GTK_BUTTON( shortcut_button ), shortcut );
g_free( shortcut );
- nact_gtk_utils_set_editable( GTK_WIDGET( shortcut_button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( shortcut_button ), editable );
/* TODO: don't know how to edit a shortcut for now */
gtk_widget_set_sensitive( shortcut_button, FALSE );
@@ -313,7 +313,7 @@ on_tab_updatable_selection_changed( NactIPropertiesTab *instance, gint count_sel
*/
readonly_button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( instance ), "ActionReadonlyButton" ));
gtk_toggle_button_set_active( readonly_button, item ? na_object_is_readonly( item ) : FALSE );
- nact_gtk_utils_set_editable( GTK_WIDGET( readonly_button ), FALSE );
+ nact_gtk_utils_set_editable( G_OBJECT( readonly_button ), FALSE );
label_widget = base_window_get_widget( BASE_WINDOW( instance ), "ActionItemID" );
label = item ? na_object_get_id( item ) : g_strdup( "" );
diff --git a/src/nact/nact-ischemes-tab.c b/src/nact/nact-ischemes-tab.c
index 5f75b8d..065bd33 100644
--- a/src/nact/nact-ischemes-tab.c
+++ b/src/nact/nact-ischemes-tab.c
@@ -228,7 +228,7 @@ on_tab_updatable_selection_changed( BaseWindow *window, gint count_selected )
context = nact_main_tab_get_context( NACT_MAIN_WINDOW( window ), &editable );
button = base_window_get_widget( window, "AddFromDefaultButton" );
- nact_gtk_utils_set_editable( GTK_WIDGET( button ), editable );
+ nact_gtk_utils_set_editable( G_OBJECT( button ), editable );
}
static void
diff --git a/src/nact/nact-match-list.c b/src/nact/nact-match-list.c
index 18585fd..ffa32c1 100644
--- a/src/nact/nact-match-list.c
+++ b/src/nact/nact-match-list.c
@@ -351,10 +351,10 @@ nact_match_list_on_selection_changed( BaseWindow *window, const gchar *tab_name,
}
column = gtk_tree_view_get_column( data->listview, ITEM_COLUMN );
- nact_gtk_utils_set_editable( GTK_WIDGET( column ), data->editable_item && data->editable_filter );
+ nact_gtk_utils_set_editable( G_OBJECT( column ), data->editable_item && data->editable_filter );
- nact_gtk_utils_set_editable( GTK_WIDGET( data->addbutton ), data->editable_item );
- nact_gtk_utils_set_editable( GTK_WIDGET( data->removebutton ), data->editable_item );
+ nact_gtk_utils_set_editable( G_OBJECT( data->addbutton ), data->editable_item );
+ nact_gtk_utils_set_editable( G_OBJECT( data->removebutton ), data->editable_item );
gtk_widget_set_sensitive( data->removebutton, FALSE );
st_on_selection_change = FALSE;
diff --git a/src/nact/nact-schemes-list.c b/src/nact/nact-schemes-list.c
index 9ce17b2..0016f4c 100644
--- a/src/nact/nact-schemes-list.c
+++ b/src/nact/nact-schemes-list.c
@@ -142,7 +142,7 @@ nact_schemes_list_create_model( GtkTreeView *treeview, guint mode )
gtk_tree_sortable_set_sort_column_id( GTK_TREE_SORTABLE( model ), SCHEMES_KEYWORD_COLUMN, GTK_SORT_ASCENDING );
gtk_tree_view_column_set_cell_data_func(
column, text_cell, ( GtkTreeCellDataFunc ) display_keyword, data, NULL );
- nact_gtk_utils_set_editable( GTK_WIDGET( column ), mode == SCHEMES_LIST_FOR_PREFERENCES );
+ nact_gtk_utils_set_editable( G_OBJECT( column ), mode == SCHEMES_LIST_FOR_PREFERENCES );
text_cell = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
@@ -153,7 +153,7 @@ nact_schemes_list_create_model( GtkTreeView *treeview, guint mode )
gtk_tree_view_append_column( treeview, column );
gtk_tree_view_column_set_cell_data_func(
column, text_cell, ( GtkTreeCellDataFunc ) display_description, data, NULL );
- nact_gtk_utils_set_editable( GTK_WIDGET( column ), mode == SCHEMES_LIST_FOR_PREFERENCES );
+ nact_gtk_utils_set_editable( G_OBJECT( column ), mode == SCHEMES_LIST_FOR_PREFERENCES );
gtk_tree_view_set_headers_visible( treeview, FALSE );
diff --git a/src/nact/nautilus-actions-config-tool.ui b/src/nact/nautilus-actions-config-tool.ui
index 6bff549..fdfa83c 100644
--- a/src/nact/nautilus-actions-config-tool.ui
+++ b/src/nact/nautilus-actions-config-tool.ui
@@ -366,7 +366,6 @@ Menus are never displayed in the toolbar.</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_Icon :</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">ActionIconComboBoxEntry</property>
</object>
<packing>
<property name="top_attach">1</property>
@@ -412,14 +411,10 @@ Menus are never displayed in the toolbar.</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="ActionIconComboBoxEntry">
+ <object class="GtkHBox" id="ActionIconHBox">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes">Select the icon which will appear in the Nautilus menus and in the toolbar.</property>
<child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
+ <placeholder/>
</child>
</object>
<packing>
@@ -2786,6 +2781,9 @@ If the command is not found, or does not display the correct result, your item w
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="label" translatable="yes">This assistant will guide you through the process of importing items, actions or menus.</property>
@@ -2801,10 +2799,10 @@ If the command is not found, or does not display the correct result, your item w
<child>
<object class="GtkFileChooserWidget" id="ImportFileChooser">
<property name="visible">True</property>
+ <property name="local_only">False</property>
+ <property name="preview_widget_active">False</property>
<property name="select_multiple">True</property>
<property name="use_preview_label">False</property>
- <property name="preview_widget_active">False</property>
- <property name="local_only">False</property>
</object>
<packing>
<property name="position">0</property>
@@ -3890,39 +3888,39 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
</object>
<object class="GtkSizeGroup" id="CommandLabelSizeGroup">
<widgets>
- <widget name="label4"/>
- <widget name="CommandParametersLabel"/>
- <widget name="CommandPathLabel"/>
<widget name="ProfileLabelLabel"/>
+ <widget name="CommandPathLabel"/>
+ <widget name="CommandParametersLabel"/>
+ <widget name="label4"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="CommandButtonSizeGroup">
<widgets>
- <widget name="CommandLegendButton"/>
<widget name="CommandPathButton"/>
+ <widget name="CommandLegendButton"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="ActionLabelSizeGroup">
<widgets>
- <widget name="ActionMenuLabelLabel"/>
- <widget name="ActionToolbarLabelLabel"/>
- <widget name="ActionTooltipLabel"/>
<widget name="ActionIconLabel"/>
+ <widget name="ActionTooltipLabel"/>
+ <widget name="ActionToolbarLabelLabel"/>
+ <widget name="ActionMenuLabelLabel"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="ExecutionModeSizeGroup">
<widgets>
- <widget name="label43"/>
- <widget name="label44"/>
<widget name="label45"/>
+ <widget name="label44"/>
+ <widget name="label43"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="PropertiesLabelSizeGroup">
<widgets>
- <widget name="label18"/>
- <widget name="label39"/>
- <widget name="label49"/>
<widget name="label19"/>
+ <widget name="label49"/>
+ <widget name="label39"/>
+ <widget name="label18"/>
</widgets>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]