[nautilus-actions: 1/4] Initial default schemes may be parameterized
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions: 1/4] Initial default schemes may be parameterized
- Date: Wed, 20 Jan 2010 22:36:18 +0000 (UTC)
commit 9f57b9bf80a57791d46ef9aecbaad815a4d1cad1
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon Jan 4 21:38:59 2010 +0100
Initial default schemes may be parameterized
TODO | 1 +
configure.ac | 1 -
nautilus-actions/nact/Makefile.am | 5 +
nautilus-actions/nact/nact-iadvanced-tab.c | 667 +------------------
nautilus-actions/nact/nact-preferences-editor.c | 8 +
.../nact/nautilus-actions-config-tool.ui | 706 +-------------------
6 files changed, 55 insertions(+), 1333 deletions(-)
---
diff --git a/TODO b/TODO
index 0e59e38..7fdf505 100644
--- a/TODO
+++ b/TODO
@@ -107,6 +107,7 @@
> remove in n-a-n
> remove in action class
+<<<<<<< HEAD
- optim: what about between base_builder_instance_init and
base_application_v_initialize_default_icon ?
diff --git a/configure.ac b/configure.ac
index 8042570..550986f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,7 +120,6 @@ AM_GCONF_SOURCE_2
#
# [nact-assistant] remove work-around for #589745 when Gtk+ >= 2.18
# [nact-main-menubar] GtkActivatable only available starting with Gtk+ 2.16
-#
# [configure.ac, nautilus-actions.c] remove test for
# nautilus_menu_provider_emit_items_updated_signal() when Gnome >= 2.16
#
diff --git a/nautilus-actions/nact/Makefile.am b/nautilus-actions/nact/Makefile.am
index 491d779..fd668b5 100644
--- a/nautilus-actions/nact/Makefile.am
+++ b/nautilus-actions/nact/Makefile.am
@@ -114,6 +114,10 @@ nautilus_actions_config_tool_SOURCES = \
nact-main-window.h \
nact-preferences-editor.c \
nact-preferences-editor.h \
+ nact-scheme.c \
+ nact-scheme.h \
+ nact-schemes-list.c \
+ nact-schemes-list.h \
nact-tree-model.c \
nact-tree-model.h \
nact-tree-model-dnd.c \
@@ -143,6 +147,7 @@ pkgdata_DATA = \
nautilus-actions-config-tool.actions \
nautilus-actions-maintainer.actions \
nact-assistant-export.ui \
+ nact-preferences.ui \
nautilus-actions-config-tool.ui \
locked.png \
transparent.png \
diff --git a/nautilus-actions/nact/nact-iadvanced-tab.c b/nautilus-actions/nact/nact-iadvanced-tab.c
index 4e43777..c197877 100644
--- a/nautilus-actions/nact/nact-iadvanced-tab.c
+++ b/nautilus-actions/nact/nact-iadvanced-tab.c
@@ -32,18 +32,13 @@
#include <config.h>
#endif
-#include <gdk/gdkkeysyms.h>
-#include <glib/gi18n.h>
-#include <string.h>
-
#include <api/na-object-api.h>
#include <runtime/na-utils.h>
#include "base-window.h"
-#include "base-iprefs.h"
-#include "nact-gtk-utils.h"
#include "nact-main-tab.h"
+#include "nact-schemes-list.h"
#include "nact-iadvanced-tab.h"
/* private interface data
@@ -52,53 +47,18 @@ struct NactIAdvancedTabInterfacePrivate {
void *empty; /* so that gcc -pedantic is happy */
};
-/* column ordering
- */
-enum {
- SCHEMES_CHECKBOX_COLUMN = 0,
- SCHEMES_KEYWORD_COLUMN,
- SCHEMES_DESC_COLUMN,
- SCHEMES_N_COLUMN
-};
-
static gboolean st_initialized = FALSE;
static gboolean st_finalized = FALSE;
-static gboolean st_on_selection_change = FALSE;
static GType register_type( void );
static void interface_base_init( NactIAdvancedTabInterface *klass );
static void interface_base_finalize( NactIAdvancedTabInterface *klass );
-static void initial_load_create_schemes_selection_list( NactIAdvancedTab *instance );
static void runtime_init_connect_signals( NactIAdvancedTab *instance, GtkTreeView *listview );
-static void runtime_init_setup_values( NactIAdvancedTab *instance, GtkTreeView *listview );
-
static void on_tab_updatable_selection_changed( NactIAdvancedTab *instance, gint count_selected );
static void on_tab_updatable_enable_tab( NactIAdvancedTab *instance, NAObjectItem *item );
static gboolean tab_set_sensitive( NactIAdvancedTab *instance );
-
-static gboolean on_key_pressed_event( GtkWidget *widget, GdkEventKey *event, NactIAdvancedTab *instance );
-static void inline_edition( NactIAdvancedTab *instance );
-static void insert_new_row( NactIAdvancedTab *instance );
-static void delete_row( NactIAdvancedTab *instance );
-
-static gboolean get_action_schemes_list( GtkTreeModel* scheme_model, GtkTreePath *path, GtkTreeIter* iter, GSList **schemes_list );
-static GtkButton *get_add_button( NactIAdvancedTab *instance );
-static GtkButton *get_button( NactIAdvancedTab *instance, const gchar *name );
-static GtkButton *get_remove_button( NactIAdvancedTab *instance );
-static GSList *get_schemes_default_list( NactIAdvancedTab *instance );
-static GtkTreeModel *get_schemes_tree_model( NactIAdvancedTab *instance );
static GtkTreeView *get_schemes_tree_view( NactIAdvancedTab *instance );
-static void on_add_scheme_clicked( GtkButton *button, NactIAdvancedTab *instance );
-static void on_remove_scheme_clicked( GtkButton *button, NactIAdvancedTab *instance );
-static void on_scheme_desc_edited( GtkCellRendererText *renderer, const gchar *path, const gchar *text, NactIAdvancedTab *instance );
-static void on_scheme_keyword_edited( GtkCellRendererText *renderer, const gchar *path, const gchar *text, NactIAdvancedTab *instance );
-static void on_scheme_list_selection_changed( GtkTreeSelection *selection, NactIAdvancedTab *instance );
-static void on_scheme_selection_toggled( GtkCellRendererToggle *renderer, gchar *path, NactIAdvancedTab *instance );
-static gboolean reset_schemes_list( GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data );
-static void scheme_cell_edited( NactIAdvancedTab *instance, const gchar *path_string, const gchar *text, gint column, gboolean *state, gchar **old_text );
-static void set_action_schemes( gchar *scheme, GtkTreeModel *model );
-static void release_schemes_list( NactIAdvancedTab *instance );
GType
nact_iadvanced_tab_get_type( void )
@@ -145,6 +105,7 @@ interface_base_init( NactIAdvancedTabInterface *klass )
static const gchar *thisfn = "nact_iadvanced_tab_interface_base_init";
if( !st_initialized ){
+
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
klass->private = g_new0( NactIAdvancedTabInterfacePrivate, 1 );
@@ -159,6 +120,7 @@ interface_base_finalize( NactIAdvancedTabInterface *klass )
static const gchar *thisfn = "nact_iadvanced_tab_interface_base_finalize";
if( !st_finalized ){
+
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
g_free( klass->private );
@@ -172,67 +134,12 @@ nact_iadvanced_tab_initial_load_toplevel( NactIAdvancedTab *instance )
{
static const gchar *thisfn = "nact_iadvanced_tab_initial_load_toplevel";
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
- g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
-
- if( st_initialized && !st_finalized ){
- initial_load_create_schemes_selection_list( instance );
- }
-}
-
-/*
- * create the listview
- * initializes it with default values
- */
-static void
-initial_load_create_schemes_selection_list( NactIAdvancedTab *instance )
-{
- static const char *thisfn = "nact_iadvanced_tab_initial_load_create_schemes_selection_list";
- GtkTreeView *listview;
- GtkListStore *model;
- GtkCellRenderer *toggled_cell;
- GtkTreeViewColumn *column;
- GtkCellRenderer *text_cell;
- GtkTreeSelection *selection;
-
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
- g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
-
if( st_initialized && !st_finalized ){
- model = gtk_list_store_new( SCHEMES_N_COLUMN, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING );
- listview = get_schemes_tree_view( instance );
- gtk_tree_view_set_model( listview, GTK_TREE_MODEL( model ));
- g_object_unref( model );
-
- toggled_cell = gtk_cell_renderer_toggle_new();
- column = gtk_tree_view_column_new_with_attributes(
- "scheme-selected",
- toggled_cell,
- "active", SCHEMES_CHECKBOX_COLUMN,
- NULL );
- gtk_tree_view_append_column( listview, column );
-
- text_cell = gtk_cell_renderer_text_new();
- column = gtk_tree_view_column_new_with_attributes(
- "scheme-code",
- text_cell,
- "text", SCHEMES_KEYWORD_COLUMN,
- NULL );
- gtk_tree_view_append_column( listview, column );
-
- text_cell = gtk_cell_renderer_text_new();
- column = gtk_tree_view_column_new_with_attributes(
- "scheme-description",
- text_cell,
- "text", SCHEMES_DESC_COLUMN,
- NULL );
- gtk_tree_view_append_column( listview, column );
-
- gtk_tree_view_set_headers_visible( listview, FALSE );
+ g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
+ g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
- selection = gtk_tree_view_get_selection( listview );
- gtk_tree_selection_set_mode( selection, GTK_SELECTION_BROWSE );
+ nact_schemes_list_create_model( get_schemes_tree_view( instance ));
}
}
@@ -242,16 +149,14 @@ nact_iadvanced_tab_runtime_init_toplevel( NactIAdvancedTab *instance )
static const gchar *thisfn = "nact_iadvanced_tab_runtime_init_toplevel";
GtkTreeView *listview;
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
- g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
-
if( st_initialized && !st_finalized ){
- listview = get_schemes_tree_view( instance );
+ g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
+ g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
+ listview = get_schemes_tree_view( instance );
runtime_init_connect_signals( instance, listview );
-
- runtime_init_setup_values( instance, listview );
+ nact_schemes_list_init_view( listview, BASE_WINDOW( instance ));
}
}
@@ -259,15 +164,12 @@ static void
runtime_init_connect_signals( NactIAdvancedTab *instance, GtkTreeView *listview )
{
static const gchar *thisfn = "nact_iadvanced_tab_runtime_init_connect_signals";
- GtkTreeViewColumn *column;
- GList *renderers;
- GtkButton *add_button, *remove_button;
-
- g_debug( "%s: instance=%p, listview=%p", thisfn, ( void * ) instance, ( void * ) listview );
- g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
if( st_initialized && !st_finalized ){
+ g_debug( "%s: instance=%p, listview=%p", thisfn, ( void * ) instance, ( void * ) listview );
+ g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
+
column = gtk_tree_view_get_column( listview, SCHEMES_CHECKBOX_COLUMN );
renderers = gtk_cell_layout_get_cells( GTK_CELL_LAYOUT( column ));
base_window_signal_connect(
@@ -323,47 +225,6 @@ runtime_init_connect_signals( NactIAdvancedTab *instance, GtkTreeView *listview
G_OBJECT( instance ),
TAB_UPDATABLE_SIGNAL_ENABLE_TAB,
G_CALLBACK( on_tab_updatable_enable_tab ));
-
- base_window_signal_connect(
- BASE_WINDOW( instance ),
- G_OBJECT( listview ),
- "key-press-event",
- G_CALLBACK( on_key_pressed_event ));
- }
-}
-
-static void
-runtime_init_setup_values( NactIAdvancedTab *instance, GtkTreeView *listview )
-{
- static const gchar *thisfn = "nact_iadvanced_tab_runtime_init_setup_values";
- GtkListStore *model;
- GSList *schemes_list;
- GSList *iter;
- GtkTreeIter row;
- gchar **tokens;
-
- g_debug( "%s: instance=%p, listview=%p", thisfn, ( void * ) instance, ( void * ) listview );
- g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
-
- if( st_initialized && !st_finalized ){
-
- model = GTK_LIST_STORE( gtk_tree_view_get_model( listview ));
-
- schemes_list = get_schemes_default_list( instance );
-
- for( iter = schemes_list ; iter ; iter = iter->next ){
-
- tokens = g_strsplit(( gchar * ) iter->data, "|", 2 );
- gtk_list_store_append( model, &row );
- gtk_list_store_set( model, &row,
- SCHEMES_CHECKBOX_COLUMN, FALSE,
- SCHEMES_KEYWORD_COLUMN, tokens[0],
- SCHEMES_DESC_COLUMN, tokens[1],
- -1 );
- g_strfreev( tokens );
- }
-
- na_utils_free_string_list( schemes_list );
}
}
@@ -372,10 +233,10 @@ nact_iadvanced_tab_all_widgets_showed( NactIAdvancedTab *instance )
{
static const gchar *thisfn = "nact_iadvanced_tab_all_widgets_showed";
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
- g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
-
if( st_initialized && !st_finalized ){
+
+ g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
+ g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
}
}
@@ -384,12 +245,12 @@ nact_iadvanced_tab_dispose( NactIAdvancedTab *instance )
{
static const gchar *thisfn = "nact_iadvanced_tab_dispose";
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
- g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
-
if( st_initialized && !st_finalized ){
- release_schemes_list( instance );
+ g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
+ g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
+
+ nact_schemes_list_dispose( get_schemes_tree_view( instance ));
}
}
@@ -400,14 +261,14 @@ nact_iadvanced_tab_dispose( NactIAdvancedTab *instance )
GSList *
nact_iadvanced_tab_get_schemes( NactIAdvancedTab *instance )
{
- GSList *list = NULL;
- GtkTreeModel *scheme_model;
+ GSList *list;
- g_return_val_if_fail( NACT_IS_IADVANCED_TAB( instance ), NULL );
+ list = NULL;
+ g_return_val_if_fail( NACT_IS_IADVANCED_TAB( instance ), list );
if( st_initialized && !st_finalized ){
- scheme_model = get_schemes_tree_model( instance );
- gtk_tree_model_foreach( scheme_model, ( GtkTreeModelForeachFunc ) get_action_schemes_list, &list );
+
+ list = nact_schemes_list_get_schemes( get_schemes_tree_view( instance ));
}
return( list );
@@ -421,21 +282,14 @@ on_tab_updatable_selection_changed( NactIAdvancedTab *instance, gint count_selec
NAObjectProfile *profile;
gboolean enable_tab;
GSList *schemes;
- GtkTreeModel *scheme_model;
gboolean readonly_item;
gboolean writable_provider;
- GtkWidget *widget;
- GtkTreeViewColumn *column;
-
- g_debug( "%s: instance=%p, count_selected=%d", thisfn, ( void * ) instance, count_selected );
- g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
+ schemes = NULL;
if( st_initialized && !st_finalized ){
- st_on_selection_change = TRUE;
-
- scheme_model = get_schemes_tree_model( instance );
- gtk_tree_model_foreach( scheme_model, ( GtkTreeModelForeachFunc ) reset_schemes_list, NULL );
+ g_debug( "%s: instance=%p, count_selected=%d", thisfn, ( void * ) instance, count_selected );
+ g_return_if_fail( NACT_IS_IADVANCED_TAB( instance ));
g_object_get(
G_OBJECT( instance ),
@@ -449,27 +303,14 @@ on_tab_updatable_selection_changed( NactIAdvancedTab *instance, gint count_selec
if( profile ){
schemes = na_object_profile_get_schemes( profile );
- g_slist_foreach( schemes, ( GFunc ) set_action_schemes, scheme_model );
}
- widget = GTK_WIDGET( get_schemes_tree_view( instance ));
- gtk_widget_set_sensitive( widget, item != NULL );
-
- column = gtk_tree_view_get_column( GTK_TREE_VIEW( widget ), SCHEMES_KEYWORD_COLUMN );
- nact_gtk_utils_set_editable( GTK_OBJECT( column ), writable_provider && !readonly_item );
-
- column = gtk_tree_view_get_column( GTK_TREE_VIEW( widget ), SCHEMES_DESC_COLUMN );
- nact_gtk_utils_set_editable( GTK_OBJECT( column ), writable_provider && !readonly_item );
-
- widget = base_window_get_widget( BASE_WINDOW( instance ), "AddSchemeButton" );
- gtk_widget_set_sensitive( widget, item != NULL );
- nact_gtk_utils_set_editable( GTK_OBJECT( widget ), writable_provider && !readonly_item );
-
- widget = base_window_get_widget( BASE_WINDOW( instance ), "RemoveSchemeButton" );
- gtk_widget_set_sensitive( widget, item != NULL );
- nact_gtk_utils_set_editable( GTK_OBJECT( widget ), writable_provider && !readonly_item );
-
- st_on_selection_change = FALSE;
+ nact_schemes_list_setup_values(
+ get_schemes_tree_view( instance ),
+ BASE_WINDOW( instance ),
+ schemes,
+ item && NA_IS_OBJECT_ACTION( item ),
+ writable_provider && !readonly_item );
}
}
@@ -506,250 +347,6 @@ tab_set_sensitive( NactIAdvancedTab *instance )
return( enable_tab );
}
-static gboolean
-on_key_pressed_event( GtkWidget *widget, GdkEventKey *event, NactIAdvancedTab *instance )
-{
- gboolean stop;
- gboolean readonly_item;
- gboolean writable_provider;
-
- stop = FALSE;
-
- g_object_get(
- G_OBJECT( instance ),
- TAB_UPDATABLE_PROP_READONLY_ITEM, &readonly_item,
- TAB_UPDATABLE_PROP_WRITABLE_PROVIDER, &writable_provider,
- NULL );
-
- if( writable_provider && !readonly_item ){
-
- if( event->keyval == GDK_F2 ){
- inline_edition( instance );
- stop = TRUE;
- }
-
- if( event->keyval == GDK_Insert || event->keyval == GDK_KP_Insert ){
- insert_new_row( instance );
- stop = TRUE;
- }
-
- if( event->keyval == GDK_Delete || event->keyval == GDK_KP_Delete ){
- delete_row( instance );
- stop = TRUE;
- }
- }
-
- return( stop );
-}
-
-static void
-inline_edition( NactIAdvancedTab *instance )
-{
- GtkTreeView *listview;
- GtkTreeSelection *selection;
- GList *listrows;
- GtkTreePath *path;
- GtkTreeViewColumn *column;
-
- listview = get_schemes_tree_view( instance );
- selection = gtk_tree_view_get_selection( listview );
- listrows = gtk_tree_selection_get_selected_rows( selection, NULL );
-
- if( g_list_length( listrows ) == 1 ){
- gtk_tree_view_get_cursor( listview, &path, &column );
- gtk_tree_view_set_cursor( listview, path, column, TRUE );
- gtk_tree_path_free( path );
- }
-
- g_list_foreach( listrows, ( GFunc ) gtk_tree_path_free, NULL );
- g_list_free( listrows );
-}
-
-static void
-insert_new_row( NactIAdvancedTab *instance )
-{
- GtkTreeView *listview;
- GtkTreeModel *model;
- GtkTreeSelection *selection;
- GList *listrows;
- GtkTreePath *path;
- GtkTreeIter iter, sibling;
- gboolean inserted;
- GtkTreeViewColumn *column;
-
- listview = get_schemes_tree_view( instance );
- model = gtk_tree_view_get_model( listview );
- selection = gtk_tree_view_get_selection( listview );
- listrows = gtk_tree_selection_get_selected_rows( selection, NULL );
- inserted = FALSE;
- column = NULL;
-
- if( g_list_length( listrows ) == 1 ){
- gtk_tree_view_get_cursor( listview, &path, &column );
- if( gtk_tree_model_get_iter( model, &sibling, path )){
- /* though the path of sibling is correct, the new row is always
- * inserted at path=0 !
- */
- /*g_debug( "insert_new_row: sibling=%s", gtk_tree_model_get_string_from_iter( &sibling ));*/
- gtk_list_store_insert_before( GTK_LIST_STORE( model ), &iter, &sibling );
- inserted = TRUE;
- }
- gtk_tree_path_free( path );
- }
-
- if( !inserted ){
- gtk_list_store_append( GTK_LIST_STORE( model ), &iter );
- }
-
- if( !column || column == gtk_tree_view_get_column( listview, SCHEMES_CHECKBOX_COLUMN )){
- column = gtk_tree_view_get_column( listview, SCHEMES_KEYWORD_COLUMN );
- }
-
- gtk_list_store_set( GTK_LIST_STORE( model ), &iter,
- SCHEMES_CHECKBOX_COLUMN, FALSE,
- /* i18n notes : scheme name set for a new entry in the scheme list */
- SCHEMES_KEYWORD_COLUMN, _( "new-scheme" ),
- SCHEMES_DESC_COLUMN, _( "New scheme description" ),
- -1 );
-
- g_list_foreach( listrows, ( GFunc ) gtk_tree_path_free, NULL );
- g_list_free( listrows );
-
- path = gtk_tree_model_get_path( model, &iter );
- gtk_tree_view_set_cursor( listview, path, column, TRUE );
- gtk_tree_path_free( path );
-}
-
-static void
-delete_row( NactIAdvancedTab *instance )
-{
- NAObjectProfile *edited;
- GtkTreeView *listview;
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- GList *rows;
- GtkTreeIter iter;
- GtkTreePath *path;
- gboolean toggle_state;
- gchar *scheme;
-
- listview = get_schemes_tree_view( instance );
- selection = gtk_tree_view_get_selection( listview );
- model = get_schemes_tree_model( instance );
-
- rows = gtk_tree_selection_get_selected_rows( selection, &model );
-
- if( g_list_length( rows ) == 1 ){
- path = ( GtkTreePath * ) rows->data;
- gtk_tree_model_get_iter( model, &iter, path );
- gtk_tree_model_get( model, &iter,
- SCHEMES_CHECKBOX_COLUMN, &toggle_state,
- SCHEMES_KEYWORD_COLUMN, &scheme, -1 );
- gtk_list_store_remove( GTK_LIST_STORE( model ), &iter );
-
- if( toggle_state ){
- g_object_get(
- G_OBJECT( instance ),
- TAB_UPDATABLE_PROP_EDITED_PROFILE, &edited,
- NULL );
- na_object_profile_set_scheme( edited, scheme, FALSE );
- g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited, FALSE );
- }
-
- g_free( scheme );
-
- if( gtk_tree_model_get_iter( model, &iter, path ) ||
- gtk_tree_path_prev( path )){
-
- gtk_tree_view_set_cursor( listview, path, NULL, FALSE );
- }
- }
-
- g_list_foreach( rows, ( GFunc ) gtk_tree_path_free, NULL );
- g_list_free( rows );
-}
-
-/*
- * CommandExampleLabel is updated each time a field is modified
- * And at each time, we need the list of selected schemes
- */
-static gboolean
-get_action_schemes_list( GtkTreeModel* scheme_model, GtkTreePath *path, GtkTreeIter* iter, GSList **schemes_list )
-{
- /*static const char *thisfn = "nact_iadvanced_tab_get_action_schemes_list";*/
-
- gboolean toggle_state;
- gchar* scheme;
-
- gtk_tree_model_get( scheme_model, iter, SCHEMES_CHECKBOX_COLUMN, &toggle_state, SCHEMES_KEYWORD_COLUMN, &scheme, -1 );
-
- if( toggle_state ){
- /*g_debug( "%s: adding '%s' scheme", thisfn, scheme );*/
- ( *schemes_list ) = g_slist_append(( *schemes_list ), scheme );
- }
-
- /* don't stop looping */
- return( FALSE );
-}
-
-static GtkButton *
-get_add_button( NactIAdvancedTab *instance )
-{
- return( get_button( instance, "AddSchemeButton" ));
-}
-
-static GtkButton *
-get_button( NactIAdvancedTab *instance, const gchar *name )
-{
- GtkWidget *button;
-
- button = base_window_get_widget( BASE_WINDOW( instance ), name );
- g_assert( GTK_IS_BUTTON( button ));
-
- return( GTK_BUTTON( button ));
-}
-
-static GtkButton *
-get_remove_button( NactIAdvancedTab *instance )
-{
- return( get_button( instance, "RemoveSchemeButton" ));
-}
-
-/*
- * return default schemes list
- * the returned list must be released with na_utils_free_string_list()
- */
-static GSList *
-get_schemes_default_list( NactIAdvancedTab *instance )
-{
- GSList *list = NULL;
-
- /* i18n notes : description of 'file' scheme */
- list = g_slist_append( list, g_strdup_printf( "file|%s", _( "Local files")));
- /* i18n notes : description of 'sftp' scheme */
- list = g_slist_append( list, g_strdup_printf( "sftp|%s", _( "SSH files")));
- /* i18n notes : description of 'smb' scheme */
- list = g_slist_append( list, g_strdup_printf( "smb|%s", _( "Windows files")));
- /* i18n notes : description of 'ftp' scheme */
- list = g_slist_append( list, g_strdup_printf( "ftp|%s", _( "FTP files")));
- /* i18n notes : description of 'dav' scheme */
- list = g_slist_append( list, g_strdup_printf( "dav|%s", _( "WebDAV files")));
-
- return( list );
-}
-
-static GtkTreeModel *
-get_schemes_tree_model( NactIAdvancedTab *instance )
-{
- GtkTreeView *listview;
- GtkTreeModel *model;
-
- listview = get_schemes_tree_view( instance );
- model = gtk_tree_view_get_model( listview );
-
- return( model );
-}
-
static GtkTreeView *
get_schemes_tree_view( NactIAdvancedTab *instance )
{
@@ -760,199 +357,3 @@ get_schemes_tree_view( NactIAdvancedTab *instance )
return( GTK_TREE_VIEW( treeview ));
}
-
-static void
-on_add_scheme_clicked( GtkButton *button, NactIAdvancedTab *instance )
-{
- insert_new_row( instance );
-}
-
-static void
-on_remove_scheme_clicked( GtkButton *button, NactIAdvancedTab *instance )
-{
- delete_row( instance );
-}
-
-static void
-on_scheme_desc_edited( GtkCellRendererText *renderer, const gchar *path, const gchar *text, NactIAdvancedTab *instance )
-{
- /*static const gchar *thisfn = "nact_iadvanced_tab_on_scheme_desc_edited";
- g_debug( "%s: renderer=%p, path=%s, text=%s, user_data=%p", thisfn, renderer, path, text, user_data );*/
-
- scheme_cell_edited( instance, path, text, SCHEMES_DESC_COLUMN, NULL, NULL );
-}
-
-static void
-on_scheme_keyword_edited( GtkCellRendererText *renderer, const gchar *path, const gchar *text, NactIAdvancedTab *instance )
-{
- /*static const gchar *thisfn = "nact_iadvanced_tab_on_scheme_keyword_edited";*/
- /*g_debug( "%s: renderer=%p, path=%s, text=%s, user_data=%p", thisfn, renderer, path, text, user_data );*/
-
- gboolean state = FALSE;
- gchar *old_text = NULL;
- NAObjectProfile *edited;
-
- scheme_cell_edited( instance, path, text, SCHEMES_KEYWORD_COLUMN, &state, &old_text );
-
- if( state ){
- /*g_debug( "%s: old_scheme=%s", thisfn, old_text );*/
- g_object_get(
- G_OBJECT( instance ),
- TAB_UPDATABLE_PROP_EDITED_PROFILE, &edited,
- NULL );
- na_object_profile_set_scheme( edited, old_text, FALSE );
- na_object_profile_set_scheme( edited, text, TRUE );
- g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited, FALSE );
- }
-
- g_free( old_text );
-}
-
-static void
-on_scheme_list_selection_changed( GtkTreeSelection *selection, NactIAdvancedTab *instance )
-{
- /*static const gchar *thisfn = "nact_iadvanced_tab_on_scheme_list_selection_changed";
- g_debug( "%s: selection=%p, user_data=%p", thisfn, selection, user_data );*/
-
- gboolean readonly_item;
- gboolean writable_provider;
- GtkButton *button;
-
- g_object_get(
- G_OBJECT( instance ),
- TAB_UPDATABLE_PROP_READONLY_ITEM, &readonly_item,
- TAB_UPDATABLE_PROP_WRITABLE_PROVIDER, &writable_provider,
- NULL );
-
- if( writable_provider && !readonly_item ){
-
- button = get_remove_button( instance );
-
- if( gtk_tree_selection_count_selected_rows( selection )){
- gtk_widget_set_sensitive( GTK_WIDGET( button ), TRUE );
- } else {
- gtk_widget_set_sensitive( GTK_WIDGET( button ), FALSE );
- }
- }
-}
-
-static void
-on_scheme_selection_toggled( GtkCellRendererToggle *renderer, gchar *path, NactIAdvancedTab *instance )
-{
- /*static const gchar *thisfn = "nact_iadvanced_tab_on_scheme_selection_toggled";*/
- /*g_debug( "%s: renderer=%p, path=%s, user_data=%p", thisfn, renderer, path, user_data );*/
-
- NAObjectProfile *edited;
- GtkTreeModel *model;
- GtkTreeIter iter;
- GtkTreePath *tree_path;
- gboolean state;
- gchar *scheme;
- gboolean readonly_item;
- gboolean writable_provider;
-
- if( !st_on_selection_change ){
-
- g_object_get(
- G_OBJECT( instance ),
- TAB_UPDATABLE_PROP_EDITED_PROFILE, &edited,
- TAB_UPDATABLE_PROP_READONLY_ITEM, &readonly_item,
- TAB_UPDATABLE_PROP_WRITABLE_PROVIDER, &writable_provider,
- NULL );
-
- if( edited ){
- model = get_schemes_tree_model( instance );
-
- tree_path = gtk_tree_path_new_from_string( path );
- gtk_tree_model_get_iter( model, &iter, tree_path );
- gtk_tree_path_free( tree_path );
-
- gtk_tree_model_get( model, &iter, SCHEMES_CHECKBOX_COLUMN, &state, SCHEMES_KEYWORD_COLUMN, &scheme, -1 );
-
- /* gtk_tree_model_get: returns the previous state
- g_debug( "%s: gtk_tree_model_get returns keyword=%s state=%s", thisfn, scheme, state ? "True":"False" );*/
-
- if( readonly_item || !writable_provider ){
- g_signal_handlers_block_by_func(( gpointer ) renderer, on_scheme_selection_toggled, instance );
- gtk_cell_renderer_toggle_set_active( renderer, state );
- g_signal_handlers_unblock_by_func(( gpointer ) renderer, on_scheme_selection_toggled, instance );
-
- } else {
- gtk_list_store_set( GTK_LIST_STORE( model ), &iter, SCHEMES_CHECKBOX_COLUMN, !state, -1 );
- na_object_profile_set_scheme( edited, scheme, !state );
- g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited, FALSE );
- }
-
- g_free( scheme );
- }
- }
-}
-
-static gboolean
-reset_schemes_list( GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data )
-{
- gtk_list_store_set( GTK_LIST_STORE( model ), iter, SCHEMES_CHECKBOX_COLUMN, FALSE, -1 );
-
- return( FALSE ); /* don't stop looping */
-}
-
-static void
-scheme_cell_edited( NactIAdvancedTab *instance, const gchar *path_string, const gchar *text, gint column, gboolean *state, gchar **old_text )
-{
- GtkTreeModel *model = get_schemes_tree_model( instance );
- GtkTreeIter iter;
- GtkTreePath *path;
-
- path = gtk_tree_path_new_from_string( path_string );
- gtk_tree_model_get_iter( model, &iter, path );
- gtk_tree_path_free( path );
-
- if( state && old_text ){
- gtk_tree_model_get( model, &iter, SCHEMES_CHECKBOX_COLUMN, state, SCHEMES_KEYWORD_COLUMN, old_text, -1 );
- }
-
- gtk_list_store_set( GTK_LIST_STORE( model ), &iter, column, text, -1 );
-}
-
-static void
-set_action_schemes( gchar *scheme, GtkTreeModel *model )
-{
- GtkTreeIter iter;
- gboolean iter_ok = FALSE;
- gboolean found = FALSE;
- gchar *i_scheme;
-
- iter_ok = gtk_tree_model_get_iter_first( model, &iter );
-
- while( iter_ok && !found ){
- gtk_tree_model_get( model, &iter, SCHEMES_KEYWORD_COLUMN, &i_scheme, -1 );
-
- if( g_ascii_strcasecmp( scheme, i_scheme) == 0 ){
- gtk_list_store_set( GTK_LIST_STORE( model ), &iter, SCHEMES_CHECKBOX_COLUMN, TRUE, -1 );
- found = TRUE;
- }
-
- g_free( i_scheme );
- iter_ok = gtk_tree_model_iter_next( model, &iter );
- }
-
- if( !found ){
- gtk_list_store_append( GTK_LIST_STORE( model ), &iter );
- gtk_list_store_set(
- GTK_LIST_STORE( model ),
- &iter,
- SCHEMES_CHECKBOX_COLUMN, TRUE,
- SCHEMES_KEYWORD_COLUMN, scheme,
- SCHEMES_DESC_COLUMN, "",
- -1 );
- }
-}
-
-static void
-release_schemes_list( NactIAdvancedTab *instance )
-{
- GtkTreeModel *model;
-
- model = get_schemes_tree_model( instance );
- gtk_list_store_clear( GTK_LIST_STORE( model ));
-}
diff --git a/nautilus-actions/nact/nact-preferences-editor.c b/nautilus-actions/nact/nact-preferences-editor.c
index 6202f4c..14f86c4 100644
--- a/nautilus-actions/nact/nact-preferences-editor.c
+++ b/nautilus-actions/nact/nact-preferences-editor.c
@@ -64,6 +64,7 @@ static NactPreferencesEditor *preferences_editor_new( BaseWindow *parent );
static gchar *base_get_iprefs_window_id( BaseWindow *window );
static gchar *base_get_dialog_name( BaseWindow *window );
+static gchar *base_get_ui_filename( BaseWindow *dialog );
static void on_base_initial_load_dialog( NactPreferencesEditor *editor, gpointer user_data );
static void on_base_runtime_init_dialog( NactPreferencesEditor *editor, gpointer user_data );
static void on_base_all_widgets_showed( NactPreferencesEditor *editor, gpointer user_data );
@@ -132,6 +133,7 @@ class_init( NactPreferencesEditorClass *klass )
base_class->dialog_response = base_dialog_response;
base_class->get_toplevel_name = base_get_dialog_name;
base_class->get_iprefs_window_id = base_get_iprefs_window_id;
+ base_class->get_ui_filename = base_get_ui_filename;
}
static void
@@ -251,6 +253,12 @@ base_get_dialog_name( BaseWindow *window )
return( g_strdup( "PreferencesDialog" ));
}
+static gchar *
+base_get_ui_filename( BaseWindow *dialog )
+{
+ return( g_strdup( PKGDATADIR "/nact-preferences.ui" ));
+}
+
static void
on_base_initial_load_dialog( NactPreferencesEditor *editor, gpointer user_data )
{
diff --git a/nautilus-actions/nact/nautilus-actions-config-tool.ui b/nautilus-actions/nact/nautilus-actions-config-tool.ui
index ecdb36f..833439a 100644
--- a/nautilus-actions/nact/nautilus-actions-config-tool.ui
+++ b/nautilus-actions/nact/nautilus-actions-config-tool.ui
@@ -1990,698 +1990,6 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
</object>
</child>
</object>
- <object class="GtkDialog" id="PreferencesDialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Nautilus Actions Preferences</property>
- <property name="modal">True</property>
- <property name="type_hint">dialog</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkNotebook" id="PreferencesNotebook">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <object class="GtkVBox" id="vbox33">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkFrame" id="frame3">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox30">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkRadioButton" id="OrderAlphaAscButton">
- <property name="label" translatable="yes">_Ascending alphabetical order</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">This button being selected, treeview items (actions and menus) will be maintained in alphabetical ascending order of their label.</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="OrderAlphaDescButton">
- <property name="label" translatable="yes">_Descending alphabetical order</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">This button being selected, treeview items (actions and menus) will be maintained in alphabetical descending order of their label.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">OrderAlphaAscButton</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="OrderManualButton">
- <property name="label" translatable="yes">_Manual order</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">This button being selected, no order will be automagically forced in the treeview. Instead, you will be able to reorder each item, action or menu, individually.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">OrderAlphaAscButton</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Items ordering</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox17">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkCheckButton" id="CreateRootMenuButton">
- <property name="label" translatable="yes">_Create a root 'Nautilus Actions' menu</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">When this option is checked, a 'Nautilus Actions' item is added to the Nautilus context menu ; this item will be the root menu of all available actions.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="AddAboutButton">
- <property name="label" translatable="yes">Add an 'A_bout Nautilus Actions' item in the Nautilus context menus</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">When this option is checked, an 'About Nautilus Actions' item is added as the last item of the first level of submenus in Nautilus context menu.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label41">
- <property name="visible">True</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Nautilus menu layout</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label39">
- <property name="visible">True</property>
- <property name="tooltip_text" translatable="yes">Edit here preferences which have an impact on Nautilus Actions plugin appearance and layout.</property>
- <property name="label" translatable="yes">_Runtime preferences</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox34">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox25">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="label45">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="ypad">6</property>
- <property name="label" translatable="yes">What to do when pasting or duplicating an item in the tree ?</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox27">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkCheckButton" id="RelabelMenuButton">
- <property name="label" translatable="yes">Relabel _menus</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">The menu will be relabeled as 'Copy of <original menu label>'.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="RelabelActionButton">
- <property name="label" translatable="yes">Relabel _actions</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">The action will be relabeled as 'Copy of <original action label>'.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="RelabelProfileButton">
- <property name="label" translatable="yes">Relabel _profiles</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">The profile will be relabeled as 'Copy of <original profile label>'.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label42">
- <property name="visible">True</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Relabeling items</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame6">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkAlignment" id="alignment6">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox43">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkCheckButton" id="EscCloseButton">
- <property name="label" translatable="yes">Esc key quits the assistant</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">When this box is checked, the Escape key will close the current assistant.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="EscConfirmButton">
- <property name="label" translatable="yes">Ask for a confirmation when quitting the assistant on Esc key</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">When this box is checked, closing an assistant by hitting the Escape key will trigger a confirmation dialog.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Assistants</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label40">
- <property name="visible">True</property>
- <property name="tooltip_text" translatable="yes">There preferences only have an impact on nautilus-actions-config-tool user interface.</property>
- <property name="label" translatable="yes">_UI Preferences</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox35">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkVBox" id="vbox26">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkFrame" id="frame4">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox13">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="ypad">10</property>
- <property name="label" translatable="yes">What to do when an action being imported has the same UUID that an already existing one ?</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox32">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkRadioButton" id="PrefsNoImportButton">
- <property name="label" translatable="yes">Do _not import actions whose UUID already exists</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">The import operation will be canceled.</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="PrefsRenumberButton">
- <property name="label" translatable="yes">_Renumber imported actions whose UUID already exists</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">The imported action will be provided a new UUID. The action will be relabeled as '... (renumbered)'.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">PrefsNoImportButton</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="PrefsOverrideButton">
- <property name="label" translatable="yes">_Override existing actions when importing with same UUID</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">The existing action will be overriden by the imported one.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">PrefsNoImportButton</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="PrefsAskButton">
- <property name="label" translatable="yes">_Ask me</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">A dialog box will be brought up to ask you what to do.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">PrefsNoImportButton</property>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label44">
- <property name="visible">True</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Import mode</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label48">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Import</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox41">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkVBox" id="vbox12">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkFrame" id="frame5">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox15">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkVBox" id="vbox42">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkRadioButton" id="PrefsExportGConfSchemaV1Button">
- <property name="label" translatable="yes">Export as a _full GConf schema</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">This used to be the historical export format.
-The exported file may later be imported via :
-- Import assistant of the Nautilus Actions Configuration Tool,
-- or via the gconftool-2 --import-schema-file command-line tool.</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="PrefsExportGConfSchemaV2Button">
- <property name="label" translatable="yes">Export as a _light GConf schema</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">The exported file may later be imported via :
-- Import assistant of the Nautilus Actions Configuration Tool,
-- or via the gconftool-2 --import-schema-file command-line tool.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">PrefsExportGConfSchemaV1Button</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="PrefsExportGConfDumpButton">
- <property name="label" translatable="yes">Export as a GConf _dump file</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">This should be the preferred format for newly exported actions.
-The exported file may later be imported via :
-- Import assistant of the Nautilus Actions Configuration Tool,
-- or via the gconftool-2 --load command-line tool.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">PrefsExportGConfSchemaV1Button</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="PrefsExportAskButton">
- <property name="label" translatable="yes">_Ask me</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">You will be asked each time an action is about to be exported.</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">PrefsExportGConfSchemaV1Button</property>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label49">
- <property name="visible">True</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Export format</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label43">
- <property name="visible">True</property>
- <property name="tooltip_text" translatable="yes">There preferences are used by assistants and drag and drop operations.</property>
- <property name="label" translatable="yes">_Export</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="CancelButton">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="OKButton">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">CancelButton</action-widget>
- <action-widget response="0">OKButton</action-widget>
- </action-widgets>
- </object>
<object class="GtkDialog" id="AssistantImportAsk">
<property name="border_width">5</property>
<property name="title" translatable="yes">Already existing action</property>
@@ -2974,24 +2282,24 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
</object>
<object class="GtkSizeGroup" id="CommandLabelSizeGroup">
<widgets>
- <widget name="CommandParametersLabel"/>
- <widget name="CommandPathLabel"/>
<widget name="ProfileLabelLabel"/>
+ <widget name="CommandPathLabel"/>
+ <widget name="CommandParametersLabel"/>
</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="ActionIconLabel"/>
- <widget name="ActionTooltipLabel"/>
- <widget name="ActionIdLabel"/>
- <widget name="ActionMenuLabelLabel"/>
<widget name="ActionIconLabelLabel"/>
+ <widget name="ActionMenuLabelLabel"/>
+ <widget name="ActionIdLabel"/>
+ <widget name="ActionTooltipLabel"/>
+ <widget name="ActionIconLabel"/>
</widgets>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]