[nautilus-actions] Impot two new dialogs and fix GtkBuilder widget search
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Subject: [nautilus-actions] Impot two new dialogs and fix GtkBuilder widget search
- Date: Tue, 14 Jul 2009 18:48:50 +0000 (UTC)
commit aeef880f5be64dd44f5b57bc61394b7bc5c17f06
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Jul 1 15:11:13 2009 +0200
Impot two new dialogs and fix GtkBuilder widget search
ChangeLog | 21 +
src/nact/base-application.c | 106 ++++-
src/nact/base-application.h | 25 +-
src/nact/base-window.c | 107 +++--
src/nact/base-window.h | 14 +-
src/nact/nact-action-conditions-editor.c | 2 +-
src/nact/nact-action-profiles-editor.c | 2 +-
src/nact/nact-iprefs.c | 18 +-
src/nact/nact-iprofile-conditions.c | 11 +-
src/nact/nact-main-window.c | 5 +-
src/nact/nact-profile-conditions-editor.c | 2 +-
src/nact/nautilus-actions-config.ui | 768 ++++++++++++++++++++++++-----
12 files changed, 874 insertions(+), 207 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 41dc49d..151fd10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
2009-07-01 Pierre Wieser <pwieser trychlos org>
+ * src/nact/base-application.c:
+ * src/nact/base-application.h (recursive_search_for_child,
+ search_for_child_widget, base_application_get_dialog):
+ New functions.
+ All properties are now prefixed with "base-application-".
+
+ * src/nact/base-window.c:
+ * src/nact/base-window.h (base_window_get_dialog,
+ do_get_dialog): New functions.
+ PROP_WINDOW_TOPLEVEL_WIDGET is renamed as
+ PROP_WINDOW_TOPLEVEL_DIALOG.
+ do_get_toplevel_widget is renamed as do_get_toplevel_dialog.
+ All properties are now prefixed with "base-window-".
+
+ * src/nact/nact-main-window.c:
+ * src/nact/nact-action-conditions-editor.c:
+ * src/nact/nact-action-profiles-editor.c:
+ * src/nact/nact-profile-conditions-editor.c:
+ Updated accordingly.
+
* src/nact/nact-iactions-list.c:
* src/nact/nact-iactions-list.h
(nact_iactions_list_set_focus): New function.
@@ -18,6 +38,7 @@
* src/nact/nautilus-actions-config.ui:
Add keyboard shortcuts to ActionsDialog buttons.
+ Import two new dialog boxes.
2009-06-30 Pierre Wieser <pwieser trychlos org>
diff --git a/src/nact/base-application.c b/src/nact/base-application.c
index 0fcb71e..57a8a3c 100644
--- a/src/nact/base-application.c
+++ b/src/nact/base-application.c
@@ -37,7 +37,6 @@
#include <unique/unique.h>
#include "base-application.h"
-#include "base-window.h"
/* private class data
*/
@@ -122,6 +121,8 @@ static gchar *do_get_application_name( BaseApplication *application );
static gchar *do_get_icon_name( BaseApplication *application );
static gint display_dlg( BaseApplication *application, GtkMessageType type_message, GtkButtonsType type_buttons, const gchar *first, const gchar *second );
+static GtkWidget *recursive_search_for_child( BaseApplication *application, GtkWindow *toplevel, const gchar *name );
+static GtkWidget *search_for_child_widget( GtkContainer *container, const gchar *name );
/*static UniqueResponse on_unique_message_received( UniqueApp *app, UniqueCommand command, UniqueMessageData *message, guint time, gpointer user_data );*/
@@ -495,24 +496,72 @@ base_application_get_main_window( BaseApplication *application )
return( v_get_main_window( application ));
}
-GtkWidget *
-base_application_get_widget( BaseApplication *application, const gchar *name )
+/**
+ * Returns a pointer to the named dialog.
+ *
+ * @application: this BaseApplication.
+ *
+ * @name: the name of the searched toplevel dialog.
+ *
+ * This function is called for having a pointer to the toplevel
+ * associated with the BaseWindow, and also for finding a specific
+ * widget inside this toplevel.
+ *
+ * Returns a pointer to the searched dialog, or NULL.
+ * This pointer is owned by GtkBuilder object, and moust not be freed
+ * nor unreffed by the caller.
+ */
+GtkWindow *
+base_application_get_dialog( BaseApplication *application, const gchar *name )
{
- /*static const gchar *thisfn = "base_application_get_widget";
+ /*static const gchar *thisfn = "base_application_get_dialog";
g_debug( "%s: application=%p, name=%s", thisfn, application, name );*/
- GtkWidget *widget = GTK_WIDGET( gtk_builder_get_object( application->private->ui_xml, name ));
+ GtkWindow *dialog = GTK_WINDOW( gtk_builder_get_object( application->private->ui_xml, name ));
- if( !widget ){
+ if( !dialog ){
gchar *msg = g_strdup_printf(
- _( "Unable to load %s widget from %s glade file." ), name, application->private->ui_fname );
+ _( "Unable to load %s dialog from %s glade file." ), name, application->private->ui_fname );
base_application_error_dlg( application, GTK_MESSAGE_ERROR, msg, NULL );
g_free( msg );
g_object_set( G_OBJECT( application ), PROP_APPLICATION_CODE_STR, 1, NULL );
} else {
- g_assert( GTK_IS_WIDGET( widget ));
+ g_assert( GTK_IS_WINDOW( dialog ));
}
+
+ return( dialog );
+}
+
+/**
+ * Returns a pointer to the named widget as a dialog's child.
+ *
+ * @application: this BaseApplication.
+ *
+ * @window: a BaseWindow document.
+ *
+ * @name: the name of the searched widget.
+ *
+ * Returns a pointer to the searched widget, or NULL.
+ * This pointer is owned by GtkBuilder object, and moust not be freed
+ * nor unreffed by the caller.
+ */
+GtkWidget *
+base_application_get_widget( BaseApplication *application, BaseWindow *window, const gchar *name )
+{
+ /*static const gchar *thisfn = "base_application_get_widget";
+ g_debug( "%s: application=%p, name=%s", thisfn, application, name );*/
+
+ GtkWidget *widget = NULL;
+ GtkWindow *toplevel = base_window_get_toplevel_dialog( window );
+
+ if( toplevel ){
+ widget = recursive_search_for_child( application, toplevel, name );
+ if( widget ){
+ g_assert( GTK_IS_WIDGET( widget ));
+ }
+ }
+
return( widget );
}
@@ -940,7 +989,7 @@ do_start( BaseApplication *application )
if( !application->private->code ){
- GtkWindow *wnd = base_window_get_toplevel_widget( window );
+ GtkWindow *wnd = base_window_get_toplevel_dialog( window );
g_assert( wnd );
g_assert( GTK_IS_WINDOW( wnd ));
@@ -1031,3 +1080,42 @@ display_dlg( BaseApplication *application, GtkMessageType type_message, GtkButto
return( result );
}
+
+static GtkWidget *
+recursive_search_for_child( BaseApplication *application, GtkWindow *toplevel, const gchar *name )
+{
+ return( search_for_child_widget( GTK_CONTAINER( toplevel ) , name ));
+}
+
+static GtkWidget *
+search_for_child_widget( GtkContainer *container, const gchar *name )
+{
+ /*static const gchar *thisfn = "base_application_search_for_child_widget";
+ g_debug( "%s: container=%p, name=%s", thisfn, container, name );*/
+
+ GList *children = gtk_container_get_children( container );
+ GList *ic;
+ GtkWidget *found = NULL;
+
+ for( ic = children ; ic ; ic = ic->next ){
+ if( GTK_IS_WIDGET( ic->data )){
+ GtkWidget *child = GTK_WIDGET( ic->data );
+ if( child->name && strlen( child->name )){
+ /*g_debug( "%s: child=%s", thisfn, child->name );*/
+ if( !g_ascii_strcasecmp( name, child->name )){
+ found = child;
+ break;
+
+ } else if( GTK_IS_CONTAINER( child )){
+ found = search_for_child_widget( GTK_CONTAINER( child ), name );
+ if( found ){
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ g_list_free( children );
+ return( found );
+}
diff --git a/src/nact/base-application.h b/src/nact/base-application.h
index 16a96e2..757f75a 100644
--- a/src/nact/base-application.h
+++ b/src/nact/base-application.h
@@ -40,6 +40,8 @@
#include <glib-object.h>
#include <gtk/gtk.h>
+#include "base-window.h"
+
G_BEGIN_DECLS
#define BASE_APPLICATION_TYPE ( base_application_get_type())
@@ -87,16 +89,16 @@ typedef struct {
/* instance properties
*/
-#define PROP_APPLICATION_ARGC_STR "argc"
-#define PROP_APPLICATION_ARGV_STR "argv"
-#define PROP_APPLICATION_UNIQUE_NAME_STR "unique-name"
-#define PROP_APPLICATION_UNIQUE_APP_STR "unique-app"
-#define PROP_APPLICATION_NAME_STR "application-name"
-#define PROP_APPLICATION_ICON_NAME_STR "icon-name"
-#define PROP_APPLICATION_CODE_STR "code"
-#define PROP_APPLICATION_UI_XML_STR "ui-xml"
-#define PROP_APPLICATION_UI_FILENAME_STR "ui-filename"
-#define PROP_APPLICATION_MAIN_WINDOW_STR "main-window"
+#define PROP_APPLICATION_ARGC_STR "base-application-argc"
+#define PROP_APPLICATION_ARGV_STR "base-application-argv"
+#define PROP_APPLICATION_UNIQUE_NAME_STR "base-application-unique-name"
+#define PROP_APPLICATION_UNIQUE_APP_STR "base-application-unique-app"
+#define PROP_APPLICATION_NAME_STR "base-application-application-name"
+#define PROP_APPLICATION_ICON_NAME_STR "base-application-icon-name"
+#define PROP_APPLICATION_CODE_STR "base-application-code"
+#define PROP_APPLICATION_UI_XML_STR "base-application-ui-xml"
+#define PROP_APPLICATION_UI_FILENAME_STR "base-application-ui-filename"
+#define PROP_APPLICATION_MAIN_WINDOW_STR "base-application-main-window"
GType base_application_get_type( void );
@@ -105,7 +107,8 @@ int base_application_run( BaseApplication *application );
gchar *base_application_get_icon_name( BaseApplication *application );
GObject *base_application_get_main_window( BaseApplication *application );
-GtkWidget *base_application_get_widget( BaseApplication *application, const gchar *name );
+GtkWindow *base_application_get_dialog( BaseApplication *application, const gchar *name );
+GtkWidget *base_application_get_widget( BaseApplication *application, BaseWindow *window, const gchar *name );
void base_application_error_dlg( BaseApplication *application, GtkMessageType type, const gchar *primary, const gchar *secondary );
gboolean base_application_yesno_dlg( BaseApplication *application, GtkMessageType type, const gchar *first, const gchar *second );
diff --git a/src/nact/base-window.c b/src/nact/base-window.c
index 344d360..c0a4259 100644
--- a/src/nact/base-window.c
+++ b/src/nact/base-window.c
@@ -51,7 +51,7 @@ struct BaseWindowPrivate {
gboolean dispose_has_run;
BaseApplication *application;
gchar *toplevel_name;
- GtkWindow *toplevel_widget;
+ GtkWindow *toplevel_dialog;
gboolean initialized;
};
@@ -60,7 +60,7 @@ struct BaseWindowPrivate {
enum {
PROP_WINDOW_APPLICATION = 1,
PROP_WINDOW_TOPLEVEL_NAME,
- PROP_WINDOW_TOPLEVEL_WIDGET,
+ PROP_WINDOW_TOPLEVEL_DIALOG,
PROP_WINDOW_INITIALIZED
};
@@ -87,7 +87,8 @@ static void do_all_widgets_showed( BaseWindow *window );
static void do_run_window( BaseWindow *window );
static gboolean do_dialog_response( GtkDialog *dialog, gint code, BaseWindow *window );
static GObject *do_get_application( BaseWindow *window );
-static GtkWindow *do_get_toplevel_widget( BaseWindow *window );
+static GtkWindow *do_get_toplevel_dialog( BaseWindow *window );
+static GtkWindow *do_get_dialog( BaseWindow *window, const gchar *name );
static GtkWidget *do_get_widget( BaseWindow *window, const gchar *name );
static gboolean is_toplevel_initialized( BaseWindow *window );
@@ -157,11 +158,11 @@ class_init( BaseWindowClass *klass )
g_object_class_install_property( object_class, PROP_WINDOW_TOPLEVEL_NAME, spec );
spec = g_param_spec_pointer(
- PROP_WINDOW_TOPLEVEL_WIDGET_STR,
- PROP_WINDOW_TOPLEVEL_WIDGET_STR,
+ PROP_WINDOW_TOPLEVEL_DIALOG_STR,
+ PROP_WINDOW_TOPLEVEL_DIALOG_STR,
"The main GtkWindow attached to this object",
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE );
- g_object_class_install_property( object_class, PROP_WINDOW_TOPLEVEL_WIDGET, spec );
+ g_object_class_install_property( object_class, PROP_WINDOW_TOPLEVEL_DIALOG, spec );
spec = g_param_spec_boolean(
PROP_WINDOW_INITIALIZED_STR,
@@ -180,7 +181,8 @@ class_init( BaseWindowClass *klass )
klass->dialog_response = do_dialog_response;
klass->get_application = do_get_application;
klass->get_toplevel_name = NULL;
- klass->get_toplevel_widget = do_get_toplevel_widget;
+ klass->get_toplevel_dialog = do_get_toplevel_dialog;
+ klass->get_dialog = do_get_dialog;
klass->get_widget = do_get_widget;
}
@@ -213,8 +215,8 @@ instance_get_property( GObject *object, guint property_id, GValue *value, GParam
g_value_set_string( value, self->private->toplevel_name );
break;
- case PROP_WINDOW_TOPLEVEL_WIDGET:
- g_value_set_pointer( value, self->private->toplevel_widget );
+ case PROP_WINDOW_TOPLEVEL_DIALOG:
+ g_value_set_pointer( value, self->private->toplevel_dialog );
break;
case PROP_WINDOW_INITIALIZED:
@@ -243,8 +245,8 @@ instance_set_property( GObject *object, guint property_id, const GValue *value,
self->private->toplevel_name = g_value_dup_string( value );
break;
- case PROP_WINDOW_TOPLEVEL_WIDGET:
- self->private->toplevel_widget = g_value_get_pointer( value );
+ case PROP_WINDOW_TOPLEVEL_DIALOG:
+ self->private->toplevel_dialog = g_value_get_pointer( value );
break;
case PROP_WINDOW_INITIALIZED:
@@ -272,10 +274,10 @@ instance_dispose( GObject *window )
if( is_main_window( BASE_WINDOW( window ))){
gtk_main_quit ();
- gtk_widget_destroy( GTK_WIDGET( self->private->toplevel_widget ));
+ gtk_widget_destroy( GTK_WIDGET( self->private->toplevel_dialog ));
} else {
- gtk_widget_hide_all( GTK_WIDGET( self->private->toplevel_widget ));
+ gtk_widget_hide_all( GTK_WIDGET( self->private->toplevel_dialog ));
}
/* chain up to the parent class */
@@ -308,7 +310,11 @@ instance_finalize( GObject *window )
* @window: this BaseWindow object.
*
* This is a one-time initialization just after the BaseWindow has been
- * allocated. For an every-time initialization, see base_window_run.
+ * allocated. This should leave the BaseWindow object with a valid
+ * toplevel GtkWindow dialog. This is also time to make one-time
+ * initialization on the toplevel dialog.
+ *
+ * For an every-time initialization, see base_window_run.
*/
void
base_window_init( BaseWindow *window )
@@ -352,10 +358,24 @@ base_window_get_application( BaseWindow *window )
* @window: this BaseWindow object.
*/
GtkWindow *
-base_window_get_toplevel_widget( BaseWindow *window )
+base_window_get_toplevel_dialog( BaseWindow *window )
+{
+ g_assert( BASE_IS_WINDOW( window ));
+ return( BASE_WINDOW_GET_CLASS( window )->get_toplevel_dialog( window ));
+}
+
+/**
+ * Returns a top-level GtkWindow.
+ *
+ * @window: this BaseWindow object.
+ *
+ * @name: the name of the searched GtkWindow.
+ */
+GtkWindow *
+base_window_get_dialog( BaseWindow *window, const gchar *name )
{
g_assert( BASE_IS_WINDOW( window ));
- return( BASE_WINDOW_GET_CLASS( window )->get_toplevel_widget( window ));
+ return( BASE_WINDOW_GET_CLASS( window )->get_dialog( window, name ));
}
/**
@@ -406,11 +426,11 @@ v_initial_load_toplevel( BaseWindow *window )
{
g_assert( BASE_IS_WINDOW( window ));
- GtkWindow *toplevel = window->private->toplevel_widget;
+ GtkWindow *toplevel = window->private->toplevel_dialog;
g_assert( toplevel );
g_assert( GTK_IS_WINDOW( toplevel ));
- if( window->private->toplevel_widget ){
+ if( window->private->toplevel_dialog ){
if( BASE_WINDOW_GET_CLASS( window )->initial_load_toplevel ){
BASE_WINDOW_GET_CLASS( window )->initial_load_toplevel( window );
}
@@ -422,7 +442,7 @@ v_runtime_init_toplevel( BaseWindow *window )
{
g_assert( BASE_IS_WINDOW( window ));
- if( window->private->toplevel_widget ){
+ if( window->private->toplevel_dialog ){
if( BASE_WINDOW_GET_CLASS( window )->runtime_init_toplevel ){
BASE_WINDOW_GET_CLASS( window )->runtime_init_toplevel( window );
}
@@ -434,7 +454,7 @@ v_all_widgets_showed( BaseWindow *window )
{
g_assert( BASE_IS_WINDOW( window ));
- if( window->private->toplevel_widget ){
+ if( window->private->toplevel_dialog ){
if( BASE_WINDOW_GET_CLASS( window )->all_widgets_showed ){
BASE_WINDOW_GET_CLASS( window )->all_widgets_showed( window );
}
@@ -464,11 +484,11 @@ do_init_window( BaseWindow *window )
g_assert( BASE_IS_WINDOW( window ));
- gchar *widget_name = v_get_toplevel_name( window );
- g_assert( widget_name && strlen( widget_name ));
+ gchar *dialog_name = v_get_toplevel_name( window );
+ g_assert( dialog_name && strlen( dialog_name ));
- GtkWidget *toplevel = base_window_get_widget( window, widget_name );
- window->private->toplevel_widget = GTK_WINDOW( toplevel );
+ GtkWindow *toplevel = base_window_get_dialog( window, dialog_name );
+ window->private->toplevel_dialog = toplevel;
if( toplevel ){
g_assert( GTK_IS_WINDOW( toplevel ));
@@ -481,7 +501,7 @@ do_init_window( BaseWindow *window )
v_runtime_init_toplevel( window );
}
- g_free( widget_name );
+ g_free( dialog_name );
window->private->initialized = TRUE;
}
@@ -516,12 +536,12 @@ do_run_window( BaseWindow *window )
static const gchar *thisfn = "base_window_do_run_window";
g_debug( "%s: window=%p", thisfn, window );
- GtkWidget *this_widget = GTK_WIDGET( window->private->toplevel_widget );
- gtk_widget_show_all( this_widget );
+ GtkWidget *this_dialog = GTK_WIDGET( window->private->toplevel_dialog );
+ gtk_widget_show_all( this_dialog );
v_all_widgets_showed( window );
if( is_main_window( window )){
- g_signal_connect( G_OBJECT( this_widget ), "response", G_CALLBACK( v_dialog_response ), window );
+ g_signal_connect( G_OBJECT( this_dialog ), "response", G_CALLBACK( v_dialog_response ), window );
g_debug( "%s: starting gtk_main", thisfn );
gtk_main();
@@ -529,9 +549,9 @@ do_run_window( BaseWindow *window )
g_debug( "%s: starting gtk_dialog_run", thisfn );
gint code;
do {
- code = gtk_dialog_run( GTK_DIALOG( this_widget ));
+ code = gtk_dialog_run( GTK_DIALOG( this_dialog ));
}
- while( !v_dialog_response( GTK_DIALOG( this_widget ), code, window ));
+ while( !v_dialog_response( GTK_DIALOG( this_dialog ), code, window ));
}
}
@@ -551,26 +571,33 @@ do_get_application( BaseWindow *window )
}
static GtkWindow *
-do_get_toplevel_widget( BaseWindow *window )
+do_get_toplevel_dialog( BaseWindow *window )
+{
+ return( window->private->toplevel_dialog );
+}
+
+static GtkWindow *
+do_get_dialog( BaseWindow *window, const gchar *name )
{
- return( window->private->toplevel_widget );
+ g_assert( BASE_IS_WINDOW( window ));
+ return( base_application_get_dialog( window->private->application, name ));
}
static GtkWidget *
do_get_widget( BaseWindow *window, const gchar *name )
{
g_assert( BASE_IS_WINDOW( window ));
- return( base_application_get_widget( window->private->application, name ));
+ return( base_application_get_widget( window->private->application, window, name ));
}
static gboolean
is_toplevel_initialized( BaseWindow *window )
{
- GtkWindow *toplevel = window->private->toplevel_widget;
+ GtkWindow *toplevel = window->private->toplevel_dialog;
g_assert( toplevel );
g_assert( GTK_IS_WINDOW( toplevel ));
- gpointer data = g_object_get_data( G_OBJECT( toplevel ), "toplevel-initialized" );
+ gpointer data = g_object_get_data( G_OBJECT( toplevel ), "base-window-toplevel-initialized" );
if( !data ){
return( FALSE );
}
@@ -580,11 +607,11 @@ is_toplevel_initialized( BaseWindow *window )
static void
set_toplevel_initialized( BaseWindow *window )
{
- GtkWindow *toplevel = window->private->toplevel_widget;
+ GtkWindow *toplevel = window->private->toplevel_dialog;
g_assert( toplevel );
g_assert( GTK_IS_WINDOW( toplevel ));
- g_object_set_data( G_OBJECT( toplevel ), "toplevel-initialized", ( gpointer ) TRUE );
+ g_object_set_data( G_OBJECT( toplevel ), "base-window-toplevel-initialized", ( gpointer ) TRUE );
}
static gboolean
@@ -594,11 +621,11 @@ is_main_window( BaseWindow *window )
BaseWindow *main_window = BASE_WINDOW( base_application_get_main_window( appli ));
- GtkWidget *main_widget = GTK_WIDGET( base_window_get_toplevel_widget( main_window ));
+ GtkWidget *main_dialog = GTK_WIDGET( base_window_get_toplevel_dialog( main_window ));
- GtkWidget *this_widget = GTK_WIDGET( window->private->toplevel_widget );
+ GtkWidget *this_dialog = GTK_WIDGET( window->private->toplevel_dialog );
- return( main_widget == this_widget );
+ return( main_dialog == this_dialog );
}
void
diff --git a/src/nact/base-window.h b/src/nact/base-window.h
index 96de8a0..6552287 100644
--- a/src/nact/base-window.h
+++ b/src/nact/base-window.h
@@ -72,25 +72,27 @@ typedef struct {
gboolean ( *dialog_response ) ( GtkDialog *dialog, gint code, BaseWindow *window );
GObject * ( *get_application ) ( BaseWindow *window );
gchar * ( *get_toplevel_name ) ( BaseWindow *window );
- GtkWindow * ( *get_toplevel_widget ) ( BaseWindow *window );
+ GtkWindow * ( *get_toplevel_dialog ) ( BaseWindow *window );
+ GtkWindow * ( *get_dialog ) ( BaseWindow *window, const gchar *name );
GtkWidget * ( *get_widget ) ( BaseWindow *window, const gchar *name );
}
BaseWindowClass;
/* instance properties
*/
-#define PROP_WINDOW_APPLICATION_STR "application"
-#define PROP_WINDOW_TOPLEVEL_NAME_STR "toplevel-name"
-#define PROP_WINDOW_TOPLEVEL_WIDGET_STR "toplevel-widget"
-#define PROP_WINDOW_INITIALIZED_STR "is-initialized"
+#define PROP_WINDOW_APPLICATION_STR "base-window-application"
+#define PROP_WINDOW_TOPLEVEL_NAME_STR "base-window-toplevel-name"
+#define PROP_WINDOW_TOPLEVEL_DIALOG_STR "base-window-toplevel-dialog"
+#define PROP_WINDOW_INITIALIZED_STR "base-window-is-initialized"
GType base_window_get_type( void );
void base_window_init( BaseWindow *window );
void base_window_run( BaseWindow *window );
-GtkWindow *base_window_get_toplevel_widget( BaseWindow *window );
+GtkWindow *base_window_get_toplevel_dialog( BaseWindow *window );
GObject *base_window_get_application( BaseWindow *window );
+GtkWindow *base_window_get_dialog( BaseWindow *window, const gchar *name );
GtkWidget *base_window_get_widget( BaseWindow *window, const gchar *name );
void base_window_connect( BaseWindow *window, const gchar *widget, const gchar *signal, GCallback handler );
diff --git a/src/nact/nact-action-conditions-editor.c b/src/nact/nact-action-conditions-editor.c
index 4befe8f..0d1052c 100644
--- a/src/nact/nact-action-conditions-editor.c
+++ b/src/nact/nact-action-conditions-editor.c
@@ -356,7 +356,7 @@ on_runtime_init_dialog( BaseWindow *dialog )
static void
setup_dialog_title( NactActionConditionsEditor *dialog, gboolean is_modified )
{
- GtkWindow *toplevel = base_window_get_toplevel_widget( BASE_WINDOW( dialog ));
+ GtkWindow *toplevel = base_window_get_toplevel_dialog( BASE_WINDOW( dialog ));
gchar *title;
if( dialog->private->is_new ){
diff --git a/src/nact/nact-action-profiles-editor.c b/src/nact/nact-action-profiles-editor.c
index 3316764..98ffd25 100644
--- a/src/nact/nact-action-profiles-editor.c
+++ b/src/nact/nact-action-profiles-editor.c
@@ -279,7 +279,7 @@ on_runtime_init_dialog( BaseWindow *dialog )
static void
init_dialog_title( NactActionProfilesEditor *dialog )
{
- GtkWindow *toplevel = base_window_get_toplevel_widget( BASE_WINDOW( dialog ));
+ GtkWindow *toplevel = base_window_get_toplevel_dialog( BASE_WINDOW( dialog ));
if( dialog->private->is_new ){
gtk_window_set_title( toplevel, _( "Adding a new action" ));
diff --git a/src/nact/nact-iprefs.c b/src/nact/nact-iprefs.c
index 56d1def..492727a 100644
--- a/src/nact/nact-iprefs.c
+++ b/src/nact/nact-iprefs.c
@@ -144,7 +144,7 @@ nact_iprefs_position_window( NactWindow *window )
{
gchar *key = v_get_iprefs_window_id( window );
if( key ){
- GtkWindow *toplevel = base_window_get_toplevel_widget( BASE_WINDOW( window ));
+ GtkWindow *toplevel = base_window_get_toplevel_dialog( BASE_WINDOW( window ));
nact_iprefs_position_named_window( window, toplevel, key );
g_free( key );
}
@@ -187,7 +187,7 @@ nact_iprefs_save_window_position( NactWindow *window )
{
gchar *key = v_get_iprefs_window_id( window );
if( key ){
- GtkWindow *toplevel = base_window_get_toplevel_widget( BASE_WINDOW( window ));
+ GtkWindow *toplevel = base_window_get_toplevel_dialog( BASE_WINDOW( window ));
nact_iprefs_save_named_window_position( window, toplevel, key );
g_free( key );
}
@@ -206,13 +206,15 @@ nact_iprefs_save_named_window_position( NactWindow *window, GtkWindow *toplevel,
static const gchar *thisfn = "nact_iprefs_save_named_window_position";
gint x, y, width, height;
- gtk_window_get_position( toplevel, &x, &y );
- gtk_window_get_size( toplevel, &width, &height );
- g_debug( "%s: key=%s, x=%d, y=%d, width=%d, height=%d", thisfn, key, x, y, width, height );
+ if( GTK_IS_WINDOW( toplevel )){
+ gtk_window_get_position( toplevel, &x, &y );
+ gtk_window_get_size( toplevel, &width, &height );
+ g_debug( "%s: key=%s, x=%d, y=%d, width=%d, height=%d", thisfn, key, x, y, width, height );
- GSList *list = position_to_listint( window, x, y, width, height );
- write_key_listint( window, key, list );
- free_listint( list );
+ GSList *list = position_to_listint( window, x, y, width, height );
+ write_key_listint( window, key, list );
+ free_listint( list );
+ }
}
static gchar *
diff --git a/src/nact/nact-iprofile-conditions.c b/src/nact/nact-iprofile-conditions.c
index 03b333c..4d74a8e 100644
--- a/src/nact/nact-iprofile-conditions.c
+++ b/src/nact/nact-iprofile-conditions.c
@@ -589,7 +589,7 @@ show_legend_dialog( NactWindow *window )
GtkWindow *legend_dialog = get_legend_dialog( window );
gtk_window_set_deletable( legend_dialog, FALSE );
- GtkWindow *toplevel = base_window_get_toplevel_widget( BASE_WINDOW( window ));
+ GtkWindow *toplevel = base_window_get_toplevel_dialog( BASE_WINDOW( window ));
gtk_window_set_transient_for( GTK_WINDOW( legend_dialog ), toplevel );
nact_iprefs_position_named_window( window, legend_dialog, IPREFS_LEGEND_DIALOG );
@@ -600,8 +600,11 @@ static void
hide_legend_dialog( NactWindow *window )
{
GtkWindow *legend_dialog = get_legend_dialog( window );
- nact_iprefs_save_named_window_position( window, legend_dialog, IPREFS_LEGEND_DIALOG );
- gtk_widget_hide( GTK_WIDGET( legend_dialog ));
+
+ if( GTK_IS_WINDOW( legend_dialog )){
+ nact_iprefs_save_named_window_position( window, legend_dialog, IPREFS_LEGEND_DIALOG );
+ gtk_widget_hide( GTK_WIDGET( legend_dialog ));
+ }
/* set the legend button state consistent for when the dialog is
* hidden by another mean (eg. close the edit profile dialog)
@@ -619,7 +622,7 @@ get_legend_button( NactWindow *window )
static GtkWindow *
get_legend_dialog( NactWindow *window )
{
- return( GTK_WINDOW( base_window_get_widget( BASE_WINDOW( window ), "LegendDialog" )));
+ return( base_window_get_dialog( BASE_WINDOW( window ), "LegendDialog" ));
}
static void
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index eb10082..a3902d6 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -380,10 +380,9 @@ on_about_button_clicked( GtkButton *button, gpointer user_data )
};
gchar *license_i18n = g_strjoinv( "\n\n", license );
- GtkWidget *toplevel;
- g_object_get( G_OBJECT( wndmain ), PROP_WINDOW_TOPLEVEL_WIDGET_STR, &toplevel, NULL );
+ GtkWindow *toplevel = base_window_get_toplevel_dialog( wndmain );
- gtk_show_about_dialog( GTK_WINDOW( toplevel ),
+ gtk_show_about_dialog( toplevel,
"artists", artists,
"authors", authors,
"comments", _( "A graphical tool to create and edit your Nautilus actions." ),
diff --git a/src/nact/nact-profile-conditions-editor.c b/src/nact/nact-profile-conditions-editor.c
index 9935688..6f51856 100644
--- a/src/nact/nact-profile-conditions-editor.c
+++ b/src/nact/nact-profile-conditions-editor.c
@@ -279,7 +279,7 @@ on_runtime_init_dialog( BaseWindow *dialog )
static void
init_dialog_title( NactProfileConditionsEditor *dialog )
{
- GtkWindow *toplevel = base_window_get_toplevel_widget( BASE_WINDOW( dialog ));
+ GtkWindow *toplevel = base_window_get_toplevel_dialog( BASE_WINDOW( dialog ));
if( dialog->private->is_new ){
gtk_window_set_title( toplevel, _( "Adding a new action" ));
diff --git a/src/nact/nautilus-actions-config.ui b/src/nact/nautilus-actions-config.ui
index e3a0bc8..f76a395 100644
--- a/src/nact/nautilus-actions-config.ui
+++ b/src/nact/nautilus-actions-config.ui
@@ -276,160 +276,155 @@
<property name="border_width">10</property>
<property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label159">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Nautilus Menu Item</b></property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table3">
+ <object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="border_width">10</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">6</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkEntry" id="MenuTooltipEntry">
+ <object class="GtkLabel" id="label159">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">Tooltip of the menu item that will appear in the Nautilus statusbar.</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Nautilus Menu Item</b></property>
+ <property name="use_markup">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox63">
+ <object class="GtkTable" id="table3">
<property name="visible">True</property>
- <property name="spacing">6</property>
+ <property name="border_width">10</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
<child>
- <object class="GtkImage" id="IconImage">
- <property name="icon-size">1</property>
+ <object class="GtkEntry" id="MenuTooltipEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="MenuIconComboBoxEntry">
+ <object class="GtkHBox" id="hbox63">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes">Icon of the menu item in the Nautilus popup menu.</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
+ <object class="GtkImage" id="IconImage">
+ <property name="icon-size">1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxEntry" id="MenuIconComboBoxEntry">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="IconBrowseButton">
+ <property name="label" translatable="yes">_Browse</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
</child>
</object>
<packing>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="IconBrowseButton">
- <property name="label" translatable="yes">_Browse</property>
+ <object class="GtkLabel" id="LabelAlign3">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Icon:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LabelAlign2">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Tooltip:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LabelAlign1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Label:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="MenuLabelEntry">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">Click to choose a custom icon from a file instead of a predefined icon from the drop-down list.</property>
- <property name="use_underline">True</property>
+ <property name="invisible_char">●</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="LabelAlign3">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Icon:</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="LabelAlign2">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Tooltip:</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="LabelAlign1">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Label:</property>
- </object>
- <packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="MenuLabelEntry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">Label of the menu item in the Nautilus popup menu.</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label40">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Action</b></property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -438,6 +433,19 @@
<property name="border_width">10</property>
<property name="spacing">6</property>
<child>
+ <object class="GtkLabel" id="label40">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Action</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkHBox" id="hbox32">
<property name="visible">True</property>
<property name="spacing">6</property>
@@ -482,7 +490,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -565,7 +573,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -598,13 +606,13 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="position">3</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -1218,4 +1226,518 @@ file(s)/folder(s)</property>
</object>
</child>
</object>
+ <object class="GtkDialog" id="EditActionDialog">
+ <property name="title" translatable="yes">Nautilus Action Editor</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox9">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkVBox" id="vbox393">
+ <property name="visible">True</property>
+ <property name="border_width">10</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="label159">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Nautilus Menu Item</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table3">
+ <property name="visible">True</property>
+ <property name="border_width">10</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="MenuTooltipEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox63">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="IconImage">
+ <property name="icon-size">1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxEntry" id="MenuIconComboBoxEntry">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="IconBrowseButton">
+ <property name="label" translatable="yes">_Browse</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LabelAlign3">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Icon:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LabelAlign2">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Tooltip:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LabelAlign1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Label:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="MenuLabelEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label156">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Profiles</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox60">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow6">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="ProfilesList">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVButtonBox" id="vbuttonbox2">
+ <property name="visible">True</property>
+ <property name="spacing">3</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="AddProfileButton">
+ <property name="label">gtk-add</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Create a new profile.</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="EditProfileButton">
+ <property name="label">gtk-edit</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Edit the currently selected profile.</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>
+ <child>
+ <object class="GtkButton" id="CopyProfileButton">
+ <property name="label">gtk-copy</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Take a copy of the selected profile.</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="PasteProfileButton">
+ <property name="label">gtk-paste</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Paste the clipboard content as a new profile.</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="DeleteProfileButton">
+ <property name="label">gtk-delete</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Delete the currently selected profile.</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area9">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancelbutton3">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</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="okbutton4">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</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="-6">cancelbutton3</action-widget>
+ <action-widget response="-5">okbutton4</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkFrame" id="MenuItemFrame">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="label159">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Nautilus Menu Item</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table3">
+ <property name="visible">True</property>
+ <property name="border_width">10</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="MenuTooltipEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox63">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="IconImage">
+ <property name="icon-size">1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxEntry" id="MenuIconComboBoxEntry">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="IconBrowseButton">
+ <property name="label" translatable="yes">_Browse</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LabelAlign3">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Icon:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LabelAlign2">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Tooltip:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="LabelAlign1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Label:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="MenuLabelEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="label_item">
+ <placeholder/>
+ </child>
+ </object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]