[nautilus-actions] Remove or modify unneeded api
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Remove or modify unneeded api
- Date: Sat, 26 Sep 2009 22:47:35 +0000 (UTC)
commit ea08a0cc0c9d612f38a6b32b4f9f9be7e0810430
Author: Pierre Wieser <pwieser trychlos org>
Date: Sat Sep 19 10:56:48 2009 +0200
Remove or modify unneeded api
nact_clipboard_is_empty() is removed as nact_clipboard_primary_get_count() is required and enough.
nact_main_window_get_modified_items_count() is replaced by nact_main_window_has_modified_items().
nact_iactions_list_get_modified_items() is replaced by nact_iactions_list_has_modified_items().
nact_window_warn_modified_items_count is replaced by nact_window_warn_modified_items().
ChangeLog | 43 ++++++++
po/POTFILES.in | 7 +-
src/common/na-obj-menu.c | 8 +-
src/common/na-object.c | 2 +-
src/nact/nact-clipboard.c | 149 ++++++++++++++------------
src/nact/nact-clipboard.h | 6 +-
src/nact/nact-iaction-tab.c | 26 +++---
src/nact/nact-iactions-list.c | 219 +++++++++++++++++++++++---------------
src/nact/nact-iactions-list.h | 7 +-
src/nact/nact-iadvanced-tab.c | 18 ++--
src/nact/nact-icommand-tab.c | 16 ++--
src/nact/nact-iconditions-tab.c | 20 ++--
src/nact/nact-main-menubar.c | 58 ++++++----
src/nact/nact-main-tab.h | 3 +-
src/nact/nact-main-window.c | 148 ++++++++++++++++-----------
src/nact/nact-main-window.h | 2 +-
src/nact/nact-window.c | 25 ++---
src/nact/nact-window.h | 2 +-
18 files changed, 445 insertions(+), 314 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a52eb78..0655df1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+2009-09-19 Pierre Wieser <pwieser trychlos org>
+
+ * src/common/na-object.c b:
+ Add class name in instance_dipose() trace.
+
+ * src/common/na-obj-menu.c:
+ Remove traces at instance_dispose() and instance_finalize().
+
+ * src/nact/nact-clipboard.c:
+ * src/nact/nact-clipboard.h:
+ All functions in use for cut/copy/paste functions are renamed as
+ primary_xxx.
+ nact_clipboard_primary_counts() replaces nact_clipboard_is_empty().
+
+ * src/nact/nact-iactions-list.c:
+ * src/nact/nact-iactions-list.h:
+ nact_iactions_list_get_modified_items(): Replaced by
+ nact_iactions_list_has_modified_items().
+ nact_iactions_list_has_exportable(): New function.
+
+ * src/nact/nact-iaction-tab.c:
+ * src/nact/nact-icommand-tab.c:
+ * src/nact/nact-iconditions-tab.c:
+ * src/nact/nact-iadvanced-tab.c:
+ Emit "item-updated" signal in response to an update in tabs.
+ All selection_updated() functions renamed to selecion_changed() to
+ keep consistency() with IActionsList message.
+
+ * src/nact/nact-main-menubar.c:
+ Update conditions of sensitivity of menu items.
+
+ * src/nact/nact-main-window.c:
+ Emits "item-updated" to IActionsList in response to "item-updated"
+ from notebook's tabs.
+ nact_main_window_get_modified_items_count(): Replaced with
+ nact_main_window_has_modified_items().
+
+ * src/nact/nact-window.c:
+ * src/nact/nact-window.h (nact_window_warn_count_modified):
+ Renamed as nact_window_warn_modified() with string change.
+
+ * po/POTFILES.in: Update list of files.
+
2009-09-18 Pierre Wieser <pwieser trychlos org>
* src/common/na-gconf-utils.c:
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6fbfe7f..6644338 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,21 +1,22 @@
data/nautilus-actions.schemas.in
src/common/na-about.c
-src/common/na-action.h
+src/common/na-obj-action.h
src/common/na-iio-provider.c
src/common/na-xml-names.h
src/nact/base-application.c
src/nact/nact-application.c
-src/nact/nact-assistant.c
+src/nact/base-assistant.c
src/nact/nact-assistant-export.c
src/nact/nact-assistant-import.c
src/nact/nact.desktop.in
src/nact/nact-iaction-tab.c
src/nact/nact-iadvanced-tab.c
src/nact/nact-icommand-tab.c
-src/nact/nact-imenubar.c
+src/nact/nact-main-menubar.c
src/nact/nact-main-window.c
src/nact/nact-window.c
src/nact/nact-xml-reader.c
+src/nact/nact-assistant-export.ui
src/nact/nautilus-actions-config-tool.ui
src/test/test-parse-uris.c
src/utils/nautilus-actions-new.c
diff --git a/src/common/na-obj-menu.c b/src/common/na-obj-menu.c
index 792de58..460fbc9 100644
--- a/src/common/na-obj-menu.c
+++ b/src/common/na-obj-menu.c
@@ -147,10 +147,10 @@ instance_init( GTypeInstance *instance, gpointer klass )
static void
instance_dispose( GObject *object )
{
- static const gchar *thisfn = "na_object_menu_instance_dispose";
+ /*static const gchar *thisfn = "na_object_menu_instance_dispose";*/
NAObjectMenu *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
+ /*g_debug( "%s: object=%p", thisfn, ( void * ) object );*/
g_return_if_fail( NA_IS_OBJECT_MENU( object ));
self = NA_OBJECT_MENU( object );
@@ -168,10 +168,10 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *object )
{
- static const gchar *thisfn = "na_object_menu_instance_finalize";
+ /*static const gchar *thisfn = "na_object_menu_instance_finalize";*/
NAObjectMenu *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
+ /*g_debug( "%s: object=%p", thisfn, ( void * ) object );*/
g_return_if_fail( NA_IS_OBJECT_MENU( object ));
self = ( NAObjectMenu * ) object;
diff --git a/src/common/na-object.c b/src/common/na-object.c
index 7197c42..46922f4 100644
--- a/src/common/na-object.c
+++ b/src/common/na-object.c
@@ -209,7 +209,7 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_object_instance_dispose";
NAObject *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
+ g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
g_return_if_fail( NA_IS_OBJECT( object ));
self = NA_OBJECT( object );
diff --git a/src/nact/nact-clipboard.c b/src/nact/nact-clipboard.c
index f7f7de5..e0370bc 100644
--- a/src/nact/nact-clipboard.c
+++ b/src/nact/nact-clipboard.c
@@ -47,8 +47,6 @@
#define NACT_CLIPBOARD_ATOM gdk_atom_intern( "_NACT_CLIPBOARD", FALSE )
#define NACT_CLIPBOARD_NACT_ATOM gdk_atom_intern( "ClipboardNautilusActions", FALSE )
-#define CLIPBOARD_PROP_PRIMAY_USED "nact-clipboard-primary-used"
-
enum {
NACT_CLIPBOARD_FORMAT_NACT = 0,
NACT_CLIPBOARD_FORMAT_APPLICATION_XML,
@@ -69,14 +67,15 @@ static GtkTargetEntry clipboard_formats[] = {
};
typedef struct {
- guint nb_profiles;
guint nb_actions;
+ guint nb_profiles;
guint nb_menus;
GList *items;
}
NactClipboardData;
-static GtkClipboard *get_clipboard( void );
+static GtkClipboard *get_nact_clipboard( void );
+static GtkClipboard *get_primary_clipboard( void );
static void add_item_to_clipboard0( NAObject *object, gboolean copy_data, gboolean only_profiles, GList **copied );
/*static void add_item_to_clipboard( NAObject *object, GList **copied );*/
static void export_action( const gchar *uri, const NAObject *action, GSList **exported );
@@ -101,7 +100,7 @@ nact_clipboard_get_data_for_intern_use( GList *selected_items, gboolean copy_dat
NactClipboardData *data;
GList *it;
- clipboard = get_clipboard();
+ clipboard = get_nact_clipboard();
data = g_new0( NactClipboardData, 1 );
/*data->only_profiles = have_only_profiles( selected_items );*/
@@ -118,7 +117,6 @@ nact_clipboard_get_data_for_intern_use( GList *selected_items, gboolean copy_dat
( GtkClipboardClearFunc ) clear_clipboard_callback,
data );
- g_object_set_data( G_OBJECT( clipboard ), CLIPBOARD_PROP_PRIMAY_USED, GINT_TO_POINTER( TRUE ));
g_debug( "%s: clipboard=%p, data=%p", thisfn, ( void * ) clipboard, ( void * ) data );
}
@@ -195,27 +193,63 @@ nact_clipboard_export_items( const gchar *uri, GList *items )
}
/**
- * nact_clipboard_is_empty:
+ * nact_clipboard_primary_set:
+ * @items: a list of #NAObject items
+ * @renumber_items: whether the actions or menus items should be
+ * renumbered when copied in the clipboard ?
*
- * This is called to know if we can enable paste item in the menubar.
+ * Installs a copy of provided items in the clipboard.
+ *
+ * Rationale: when cutting an item to the clipboard, the next paste
+ * will keep its same original id, and it is safe because this is
+ * actually what we we want when we cut/paste.
+ *
+ * Contrarily, when we copy/paste, we are waiting for a new element
+ * which has the same characteristics that the previous one ; we so
+ * have to renumber actions/menus items when copying into the clipboard.
+ *
+ * Note that we use NAIDuplicable interface without actually taking care
+ * of what is origin or so, as origin will be reinitialized when getting
+ * data out of the clipboard.
*/
-gboolean
-nact_clipboard_is_empty( void )
+void
+nact_clipboard_primary_set( GList *items, gboolean renumber )
{
GtkClipboard *clipboard;
- gboolean used;
- gpointer data;
+ NactClipboardData *data;
+ GList *it;
+
+ clipboard = get_primary_clipboard();
+ data = g_new0( NactClipboardData, 1 );
+
+ for( it = items ; it ; it = it->next ){
+ data->items = g_list_prepend( data->items, na_object_duplicate( it->data ));
- clipboard = get_clipboard();
- data = g_object_get_data( G_OBJECT( clipboard ), CLIPBOARD_PROP_PRIMAY_USED );
- used = ( gboolean ) GPOINTER_TO_INT( data );
- /*g_debug( "nact_clipboard_is_empty: used=%s", used ? "True":"False" );*/
+ if( NA_IS_OBJECT_ACTION( it->data )){
+ data->nb_actions += 1;
+
+ } else if( NA_IS_OBJECT_MENU( it->data )){
+ data->nb_menus += 1;
+
+ } else if( NA_IS_OBJECT_PROFILE( it->data )){
+ data->nb_profiles += 1;
+ }
+ }
+ data->items = g_list_reverse( data->items );
- return( !used );
+ if( renumber ){
+ renumber_items( data->items );
+ }
+
+ gtk_clipboard_set_with_data( clipboard,
+ clipboard_formats, G_N_ELEMENTS( clipboard_formats ),
+ ( GtkClipboardGetFunc ) get_from_clipboard_callback,
+ ( GtkClipboardClearFunc ) clear_clipboard_callback,
+ data );
}
/**
- * nact_clipboard_get:
+ * nact_clipboard_primary_get:
*
* Returns: a copy of the list of items previously referenced in the
* internal clipboard.
@@ -224,7 +258,7 @@ nact_clipboard_is_empty( void )
* time.
*/
GList *
-nact_clipboard_get( void )
+nact_clipboard_primary_get( void )
{
GtkClipboard *clipboard;
GtkSelectionData *selection;
@@ -232,11 +266,7 @@ nact_clipboard_get( void )
GList *items, *it;
NAObject *obj;
- if( nact_clipboard_is_empty()){
- return( NULL );
- }
-
- clipboard = get_clipboard();
+ clipboard = get_primary_clipboard();
items = NULL;
@@ -259,72 +289,55 @@ nact_clipboard_get( void )
}
/**
- * nact_clipboard_set:
- * @items: a list of #NAObject items
- * @renumber_items: whether the actions or menus items should be
- * renumbered when copied in the clipboard ?
- *
- * Installs a copy of provided items in the clipboard.
- *
- * Rationale: when cutting an item to the clipboard, the next paste
- * will keep its same original id, and it is safe because this is
- * actually what we we want when we cut/paste.
- *
- * Contrarily, when we copy/paste, we are waiting for a new element
- * which has the same characteristics that the previous one ; we so
- * have to renumber actions/menus items when copying into the clipboard.
+ * nact_clipboard_primary_counts:
*
- * Note that we use NAIDuplicable interface without actually taking care
- * of what is origin or so, as origin will be reinitialized when getting
- * data out of the clipboard.
+ * Returns some counters on content of primary clipboard.
*/
void
-nact_clipboard_set( GList *items, gboolean renumber )
+nact_clipboard_primary_counts( guint *actions, guint *profiles, guint *menus )
{
GtkClipboard *clipboard;
+ GtkSelectionData *selection;
NactClipboardData *data;
- GList *it;
- clipboard = get_clipboard();
- gtk_clipboard_clear( clipboard );
- data = g_new0( NactClipboardData, 1 );
+ g_return_if_fail( actions && profiles && menus );
+ *actions = 0;
+ *profiles = 0;
+ *menus = 0;
- for( it = items ; it ; it = it->next ){
- data->items = g_list_prepend( data->items, na_object_duplicate( it->data ));
+ clipboard = get_primary_clipboard();
- if( NA_IS_OBJECT_ACTION( it->data )){
- data->nb_actions += 1;
+ selection = gtk_clipboard_wait_for_contents( clipboard, NACT_CLIPBOARD_NACT_ATOM );
- } else if( NA_IS_OBJECT_MENU( it->data )){
- data->nb_menus += 1;
+ if( selection ){
+ data = ( NactClipboardData * ) selection->data;
- } else if( NA_IS_OBJECT_PROFILE( it->data )){
- data->nb_profiles += 1;
- }
+ *actions = data->nb_actions;
+ *profiles = data->nb_profiles;
+ *menus = data->nb_menus;
}
- data->items = g_list_reverse( data->items );
+}
- if( renumber ){
- renumber_items( data->items );
- }
+static GtkClipboard *
+get_nact_clipboard( void )
+{
+ GdkDisplay *display;
+ GtkClipboard *clipboard;
- gtk_clipboard_set_with_data( clipboard,
- clipboard_formats, G_N_ELEMENTS( clipboard_formats ),
- ( GtkClipboardGetFunc ) get_from_clipboard_callback,
- ( GtkClipboardClearFunc ) clear_clipboard_callback,
- data );
+ display = gdk_display_get_default();
+ clipboard = gtk_clipboard_get_for_display( display, GDK_SELECTION_PRIMARY );
- g_object_set_data( G_OBJECT( clipboard ), CLIPBOARD_PROP_PRIMAY_USED, GINT_TO_POINTER( TRUE ));
+ return( clipboard );
}
static GtkClipboard *
-get_clipboard( void )
+get_primary_clipboard( void )
{
GdkDisplay *display;
GtkClipboard *clipboard;
display = gdk_display_get_default();
- clipboard = gtk_clipboard_get_for_display( display, GDK_SELECTION_PRIMARY );
+ clipboard = gtk_clipboard_get_for_display( display, NACT_CLIPBOARD_ATOM );
return( clipboard );
}
@@ -416,8 +429,6 @@ clear_clipboard_callback( GtkClipboard *clipboard, NactClipboardData *data )
g_list_foreach( data->items, ( GFunc ) g_object_unref, NULL );
g_list_free( data->items );
g_free( data );
-
- g_object_set_data( G_OBJECT( clipboard ), CLIPBOARD_PROP_PRIMAY_USED, GINT_TO_POINTER( FALSE ));
}
static void
diff --git a/src/nact/nact-clipboard.h b/src/nact/nact-clipboard.h
index b47eaf0..4b95837 100644
--- a/src/nact/nact-clipboard.h
+++ b/src/nact/nact-clipboard.h
@@ -38,9 +38,9 @@ G_BEGIN_DECLS
void nact_clipboard_get_data_for_intern_use( GList *selected_items, gboolean copy_data );
char *nact_clipboard_get_data_for_extern_use( GList *selected_items );
-gboolean nact_clipboard_is_empty( void );
-GList *nact_clipboard_get( void );
-void nact_clipboard_set( GList *items, gboolean renumber_items );
+void nact_clipboard_primary_set( GList *items, gboolean renumber_items );
+GList *nact_clipboard_primary_get( void );
+void nact_clipboard_primary_counts( guint *actions, guint *profiles, guint *menus );
void nact_clipboard_free_items( GSList *items );
diff --git a/src/nact/nact-iaction-tab.c b/src/nact/nact-iaction-tab.c
index 6555585..8649c9c 100644
--- a/src/nact/nact-iaction-tab.c
+++ b/src/nact/nact-iaction-tab.c
@@ -66,7 +66,7 @@ static GType register_type( void );
static void interface_base_init( NactIActionTabInterface *klass );
static void interface_base_finalize( NactIActionTabInterface *klass );
-static void on_tab_updatable_selection_updated( NactIActionTab *instance, gint count_selected );
+static void on_tab_updatable_selection_changed( NactIActionTab *instance, gint count_selected );
static void check_for_label( NactIActionTab *instance, GtkEntry *entry, const gchar *label );
static GtkTreeModel *create_stock_icon_model( void );
static void display_icon( NactIActionTab *instance, GtkWidget *image, gboolean display );
@@ -210,8 +210,8 @@ nact_iaction_tab_runtime_init_toplevel( NactIActionTab *instance )
g_signal_connect(
G_OBJECT( instance ),
- TAB_UPDATABLE_SIGNAL_SELECTION_UPDATED,
- G_CALLBACK( on_tab_updatable_selection_updated ),
+ TAB_UPDATABLE_SIGNAL_SELECTION_CHANGED,
+ G_CALLBACK( on_tab_updatable_selection_changed ),
instance );
}
@@ -251,14 +251,14 @@ nact_iaction_tab_has_label( NactIActionTab *instance )
}
static void
-on_tab_updatable_selection_updated( NactIActionTab *instance, gint count_selected )
+on_tab_updatable_selection_changed( NactIActionTab *instance, gint count_selected )
{
- static const gchar *thisfn = "nact_iaction_tab_on_tab_updatable_selection_updated";
+ static const gchar *thisfn = "nact_iaction_tab_on_tab_updatable_selection_changed";
NAObjectItem *item;
GtkWidget *label_widget, *tooltip_widget, *icon_widget, *button, *group_title;
gchar *label, *tooltip, *icon;
GtkButton *enabled_button;
- gboolean enabled_action;
+ gboolean enabled_item;
gboolean enabled_tab;
g_debug( "%s: instance=%p, count_selected=%d", thisfn, ( void * ) instance, count_selected );
@@ -305,9 +305,9 @@ on_tab_updatable_selection_updated( NactIActionTab *instance, gint count_selecte
}
enabled_button = get_enabled_button( instance );
- enabled_action = item ? na_object_is_enabled( NA_OBJECT_ITEM( item )) : FALSE;
- gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( enabled_button ), enabled_action );
- gtk_widget_set_sensitive( GTK_WIDGET( enabled_button ), enabled_tab && NA_IS_OBJECT_ACTION( item ));
+ enabled_item = item ? na_object_is_enabled( NA_OBJECT_ITEM( item )) : FALSE;
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( enabled_button ), enabled_item );
+ gtk_widget_set_sensitive( GTK_WIDGET( enabled_button ), enabled_tab );
/* TODO: manage read-only flag */
}
@@ -441,7 +441,7 @@ on_enabled_toggled( GtkToggleButton *button, NactIActionTab *instance )
if( edited && NA_IS_OBJECT_ACTION( edited )){
enabled = gtk_toggle_button_get_active( button );
na_object_item_set_enabled( edited, enabled );
- /*g_signal_emit_by_name( G_OBJECT( window ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
}
}
@@ -459,7 +459,7 @@ on_label_changed( GtkEntry *entry, NactIActionTab *instance )
if( edited ){
label = gtk_entry_get_text( entry );
na_object_set_label( NA_OBJECT( edited ), label );
- /*g_signal_emit_by_name( G_OBJECT( window ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
check_for_label( instance, entry, label );
}
@@ -521,7 +521,7 @@ on_icon_changed( GtkEntry *icon_entry, NactIActionTab *instance )
if( edited ){
icon_name = gtk_entry_get_text( icon_entry );
na_object_item_set_icon( edited, icon_name );
- /*g_signal_emit_by_name( G_OBJECT( window ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
if( icon_name && strlen( icon_name ) > 0 ){
icon = na_object_item_get_pixbuf( edited, image );
@@ -543,7 +543,7 @@ on_tooltip_changed( GtkEntry *entry, NactIActionTab *instance )
if( edited ){
na_object_item_set_tooltip( edited, gtk_entry_get_text( entry ));
- /*g_signal_emit_by_name( G_OBJECT( window ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
}
}
diff --git a/src/nact/nact-iactions-list.c b/src/nact/nact-iactions-list.c
index b49c9d3..6ecaea2 100644
--- a/src/nact/nact-iactions-list.c
+++ b/src/nact/nact-iactions-list.c
@@ -108,17 +108,18 @@ static void extend_selection_to_childs( NactIActionsList *instance, GtkT
static gboolean filter_selection( GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, NactIActionsList *instance );
static void filter_selection_iter( GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, SelectionIter *str );
static GtkTreeView *get_actions_list_treeview( NactIActionsList *instance );
-static gboolean get_item( NactTreeModel *model, GtkTreePath *path, NAObject *object, GList **items );
+static gboolean get_item_iter( NactTreeModel *model, GtkTreePath *path, NAObject *object, GList **items );
+static gboolean has_exportable_iter( NactTreeModel *model, GtkTreePath *path, NAObject *object, gboolean *has_exportable );
+static gboolean has_modified_iter( NactTreeModel *model, GtkTreePath *path, NAObject *object, gboolean *has_modified );
static gboolean have_dnd_mode( NactIActionsList *instance );
static gboolean have_filter_selection_mode( NactIActionsList *instance );
-static gboolean is_modified_item( NactTreeModel *model, GtkTreePath *path, NAObject *object, GList **items );
static gboolean is_removing( NactIActionsList *instance );
static void iter_on_selection( NactIActionsList *instance, FnIterOnSelection fn_iter, gpointer user_data );
static gboolean on_button_press_event( GtkWidget *widget, GdkEventButton *event, NactIActionsList *instance );
static gboolean on_key_pressed_event( GtkWidget *widget, GdkEventKey *event, NactIActionsList *instance );
static void on_treeview_selection_changed( GtkTreeSelection *selection, NactIActionsList *instance );
-static void on_iactions_list_item_updated( NactIActionsList *instance, GSList *updated_items );
-static void on_iactions_list_item_updated_treeview( NactIActionsList *instance, GSList *updated_items );
+static void on_iactions_list_item_updated( NactIActionsList *instance, NAObject *object );
+static void on_iactions_list_item_updated_treeview( NactIActionsList *instance, NAObject *object );
static void on_iactions_list_selection_changed( NactIActionsList *instance, GSList *selected_items );
static void select_first_row( NactIActionsList *instance );
static void set_is_filling_list( NactIActionsList *instance, gboolean is_filling );
@@ -180,12 +181,21 @@ interface_base_init( NactIActionsListInterface *klass )
/**
* nact-iactions-list-selection-changed:
*
- * This signal is emitted each time the selection is changed in
- * the treeview.
+ * This signal is emitted byIActionsList, in response to the
+ * "changed" Gtk signal, each time the selection has changed
+ * in the treeview.
*
- * User_data is a flat GSList of newly selected #NAObjects.
- * It is owned by the #IActionsList interface, and will be
- * released in the cleanup handler.
+ * This let us add the the currently selected items as user_data.
+ * (see #on_treeview_selection_changed()).
+ *
+ * Note that IActionsList is itself connected to this signal,
+ * thus converting the signal to an interface API
+ * (see #on_iactions_list_selection_changed()).
+ *
+ * The main window is typically the only interested. It will
+ * setup current item and profiles, before emitting another
+ * signal targeting the notebook tabs
+ * (see. TAB_UPDATABLE_SIGNAL_SELECTION_CHANGED signal).
*/
st_signals[ SELECTION_CHANGED ] = g_signal_new_class_handler(
IACTIONS_LIST_SIGNAL_SELECTION_CHANGED,
@@ -202,21 +212,21 @@ interface_base_init( NactIActionsListInterface *klass )
/**
* nact-iactions-list-item-updated:
*
- * This signal is emitted to inform all widgets that an item
- * has been updated.
- * This typically results in a modification of the status of
- * this item, and of all its hierarchy in the #IActionsList
- * view.
+ * This signal is emitted by the main window, in response to the
+ * similar signal emitted by each notebook's tab when an entry
+ * has been modified.
+ *
+ * After having dealing with the message, the main window
+ * forwards the information to IActionsList with this message.
*
- * User_data is a flat GSList of modified #NAObjects. This
- * list is owned by the emitter, and will be released in the
- * cleanup handler.
+ * User_data is a pointer to the modified #NAObject. It is owned
+ * by the tab who had initially sent the message.
*/
st_signals[ ITEM_UPDATED ] = g_signal_new_class_handler(
IACTIONS_LIST_SIGNAL_ITEM_UPDATED,
G_TYPE_OBJECT,
- G_SIGNAL_RUN_CLEANUP,
- G_CALLBACK( free_items_callback ),
+ G_SIGNAL_RUN_LAST,
+ G_CALLBACK( on_iactions_list_item_updated ),
NULL,
NULL,
g_cclosure_marshal_VOID__POINTER,
@@ -505,34 +515,7 @@ nact_iactions_list_get_items( NactIActionsList *instance )
treeview = get_actions_list_treeview( instance );
model = NACT_TREE_MODEL( gtk_tree_view_get_model( treeview ));
- nact_tree_model_iter( model, ( FnIterOnStore ) get_item, &items );
-
- return( g_list_reverse( items ));
-}
-
-/**
- * nact_iactions_list_get_modified_items:
- * @window: this #NactIActionsList instance.
- *
- * Returns a flat list of modified items.
- *
- * The returned #GList should be na_object_free_items()-ed.
- */
-GList *
-nact_iactions_list_get_modified_items( NactIActionsList *instance )
-{
- GList *items = NULL;
- GtkTreeView *treeview;
- NactTreeModel *model;
-
- g_return_val_if_fail( NACT_IS_IACTIONS_LIST( instance ), NULL );
-
- treeview = get_actions_list_treeview( instance );
- model = NACT_TREE_MODEL( gtk_tree_view_get_model( treeview ));
-
- nact_tree_model_iter( model, ( FnIterOnStore ) is_modified_item, &items );
-
- /*g_debug( "nact_iactions_list_get_modified_items: count=%d", g_slist_length( items ));*/
+ nact_tree_model_iter( model, ( FnIterOnStore ) get_item_iter, &items );
return( g_list_reverse( items ));
}
@@ -580,6 +563,54 @@ nact_iactions_list_get_selected_items( NactIActionsList *instance )
}
/**
+ * nact_iactions_list_has_exportable:
+ *
+ * Returns: %TRUE if there is at least one action in the list, %FALSE
+ * else.
+ *
+ * This is used to see if we can enable or not the "Export" item in the
+ * menubar (as of 1.12.1, we only export actions).
+ */
+gboolean
+nact_iactions_list_has_exportable( NactIActionsList *instance )
+{
+ gboolean has_exportable = FALSE;
+ GtkTreeView *treeview;
+ NactTreeModel *model;
+
+ g_return_val_if_fail( NACT_IS_IACTIONS_LIST( instance ), FALSE );
+
+ treeview = get_actions_list_treeview( instance );
+ model = NACT_TREE_MODEL( gtk_tree_view_get_model( treeview ));
+ nact_tree_model_iter( model, ( FnIterOnStore ) has_exportable_iter, &has_exportable );
+
+ return( has_exportable );
+}
+
+/**
+ * nact_iactions_list_has_modified_items:
+ * @window: this #NactIActionsList instance.
+ *
+ * Returns: %TRUE if at least there is one modified item in the list.
+ */
+gboolean
+nact_iactions_list_has_modified_items( NactIActionsList *instance )
+{
+ gboolean has_modified = FALSE;
+ GtkTreeView *treeview;
+ NactTreeModel *model;
+
+ g_return_val_if_fail( NACT_IS_IACTIONS_LIST( instance ), FALSE );
+
+ treeview = get_actions_list_treeview( instance );
+ model = NACT_TREE_MODEL( gtk_tree_view_get_model( treeview ));
+
+ nact_tree_model_iter( model, ( FnIterOnStore ) has_modified_iter, &has_modified );
+
+ return( has_modified );
+}
+
+/**
* nact_iactions_list_insert_items:
* @instance: this #NactIActionsList instance.
* @items: a list of items to be inserted (e.g. from a paste).
@@ -655,38 +686,41 @@ do_insert_items( GtkTreeView *treeview, GtkTreeModel *model, GList *items, GtkTr
gchar *newpathstr;
GtkTreePath *returned_path;
+ returned_path = NULL;
+
nact_window_count_level_zero_items( items, &nb_actions, &nb_profiles, &nb_menus );
g_debug( "%s: level=%d, actions=%d, profiles=%d, menus=%d", thisfn, level, nb_actions, nb_profiles, nb_menus );
- g_return_val_if_fail(( nb_profiles && !( nb_actions + nb_menus )) || ( !nb_profiles && ( nb_actions + nb_menus )), NULL );
- /*g_return_if_fail(( nb_profiles && ( NA_IS_OBJECT_ACTION( obj_selected ) || NA_IS_OBJECT_PROFILE( obj_selected ))) || !nb_profiles );*/
- returned_path = NULL;
+ if( nb_actions || nb_profiles || nb_menus ){
+ g_return_val_if_fail(( nb_profiles && !( nb_actions + nb_menus )) || ( !nb_profiles && ( nb_actions + nb_menus )), NULL );
+ /*g_return_if_fail(( nb_profiles && ( NA_IS_OBJECT_ACTION( obj_selected ) || NA_IS_OBJECT_PROFILE( obj_selected ))) || !nb_profiles );*/
- for( it = items ; it ; it = it->next ){
+ for( it = items ; it ; it = it->next ){
- nact_tree_model_insert( NACT_TREE_MODEL( model ), NA_OBJECT( it->data ), path, &iter, &obj_parent );
- newpath = gtk_tree_model_get_path( model, &iter );
+ nact_tree_model_insert( NACT_TREE_MODEL( model ), NA_OBJECT( it->data ), path, &iter, &obj_parent );
+ newpath = gtk_tree_model_get_path( model, &iter );
- if( level == 0 ){
- gtk_tree_view_expand_to_path( treeview, newpath );
- gtk_tree_path_free( returned_path );
- returned_path = gtk_tree_path_copy( newpath );
- }
+ if( level == 0 ){
+ gtk_tree_view_expand_to_path( treeview, newpath );
+ gtk_tree_path_free( returned_path );
+ returned_path = gtk_tree_path_copy( newpath );
+ }
- *parents = do_insert_items_add_parent( *parents, treeview, model, obj_parent );
+ *parents = do_insert_items_add_parent( *parents, treeview, model, obj_parent );
- newpathstr = gtk_tree_path_to_string( newpath );
- g_debug( "%s: newpath=%s", thisfn, newpathstr );
- g_free( newpathstr );
+ newpathstr = gtk_tree_path_to_string( newpath );
+ g_debug( "%s: newpath=%s", thisfn, newpathstr );
+ g_free( newpathstr );
- if( NA_IS_OBJECT_ITEM( it->data )){
- subitems = na_object_get_items( it->data );
- do_insert_items( treeview, model, subitems, newpath, level+1, parents );
- na_object_free_items( subitems );
- }
+ if( NA_IS_OBJECT_ITEM( it->data )){
+ subitems = na_object_get_items( it->data );
+ do_insert_items( treeview, model, subitems, newpath, level+1, parents );
+ na_object_free_items( subitems );
+ }
- gtk_tree_path_free( newpath );
+ gtk_tree_path_free( newpath );
+ }
}
return( level ? NULL : returned_path );
@@ -1105,7 +1139,7 @@ get_actions_list_treeview( NactIActionsList *instance )
* builds the tree
*/
static gboolean
-get_item( NactTreeModel *model, GtkTreePath *path, NAObject *object, GList **items )
+get_item_iter( NactTreeModel *model, GtkTreePath *path, NAObject *object, GList **items )
{
if( gtk_tree_path_get_depth( path ) == 1 ){
*items = g_list_prepend( *items, object );
@@ -1116,34 +1150,45 @@ get_item( NactTreeModel *model, GtkTreePath *path, NAObject *object, GList **ite
}
static gboolean
-have_dnd_mode( NactIActionsList *instance )
+has_exportable_iter( NactTreeModel *model, GtkTreePath *path, NAObject *object, gboolean *has_exportable )
{
- return(( gboolean ) GPOINTER_TO_INT( g_object_get_data( G_OBJECT( instance ), HAVE_DND_MODE )));
-}
+ if( NA_IS_OBJECT_ACTION( object )){
+ *has_exportable = TRUE;
+ return( TRUE );
+ }
-static gboolean
-have_filter_selection_mode( NactIActionsList *instance )
-{
- return(( gboolean ) GPOINTER_TO_INT( g_object_get_data( G_OBJECT( instance ), FILTER_SELECTION_MODE )));
+ /* don't stop iteration while not found or not at end */
+ return( FALSE );
}
/*
- * count _all_ modified rows, including profiles
+ * stop as soon as we have found a modified item
*/
static gboolean
-is_modified_item( NactTreeModel *model, GtkTreePath *path, NAObject *object, GList **items )
+has_modified_iter( NactTreeModel *model, GtkTreePath *path, NAObject *object, gboolean *has_modified )
{
- /*if( !NA_IS_ACTION_PROFILE( object )){*/
- if( na_object_is_modified( object )){
- *items = g_list_prepend( *items, g_object_ref( object ));
- }
- /*}*/
+ if( na_object_is_modified( object )){
+ *has_modified = TRUE;
+ return( TRUE );
+ }
- /* don't stop iteration */
+ /* don't stop iteration if not modified */
return( FALSE );
}
static gboolean
+have_dnd_mode( NactIActionsList *instance )
+{
+ return(( gboolean ) GPOINTER_TO_INT( g_object_get_data( G_OBJECT( instance ), HAVE_DND_MODE )));
+}
+
+static gboolean
+have_filter_selection_mode( NactIActionsList *instance )
+{
+ return(( gboolean ) GPOINTER_TO_INT( g_object_get_data( G_OBJECT( instance ), FILTER_SELECTION_MODE )));
+}
+
+static gboolean
is_removing( NactIActionsList *instance )
{
return(( gboolean ) GPOINTER_TO_INT( g_object_get_data( G_OBJECT( instance ), REMOVE_OPERATION )));
@@ -1237,10 +1282,10 @@ on_treeview_selection_changed( GtkTreeSelection *selection, NactIActionsList *in
* so that our implementors have the best of two worlds ;-)
*/
static void
-on_iactions_list_item_updated( NactIActionsList *instance, GSList *updated_items )
+on_iactions_list_item_updated( NactIActionsList *instance, NAObject *object )
{
if( NACT_IACTIONS_LIST_GET_INTERFACE( instance )->item_updated ){
- NACT_IACTIONS_LIST_GET_INTERFACE( instance )->item_updated( instance, updated_items );
+ NACT_IACTIONS_LIST_GET_INTERFACE( instance )->item_updated( instance, object );
}
}
@@ -1249,7 +1294,7 @@ on_iactions_list_item_updated( NactIActionsList *instance, GSList *updated_items
* update the treeview to reflects its new edition status
*/
static void
-on_iactions_list_item_updated_treeview( NactIActionsList *instance, GSList *updated_items )
+on_iactions_list_item_updated_treeview( NactIActionsList *instance, NAObject *object )
{
}
diff --git a/src/nact/nact-iactions-list.h b/src/nact/nact-iactions-list.h
index a949a2a..6df3755 100644
--- a/src/nact/nact-iactions-list.h
+++ b/src/nact/nact-iactions-list.h
@@ -58,9 +58,9 @@ typedef struct {
/**
* item_updated:
* @instance: this #NactIActionsList instance.
- * @updated_items: flat list of updated items.
+ * @object: the modified #NAObject.
*/
- void ( *item_updated ) ( NactIActionsList *instance, GSList *updated_items );
+ void ( *item_updated ) ( NactIActionsList *instance, NAObject *object );
}
NactIActionsListInterface;
@@ -79,8 +79,9 @@ void nact_iactions_list_dispose( NactIActionsList *instance );
void nact_iactions_list_delete_selection( NactIActionsList *instance, GtkTreePath **path );
void nact_iactions_list_fill( NactIActionsList *instance, GList *items );
GList *nact_iactions_list_get_items( NactIActionsList *instance );
-GList *nact_iactions_list_get_modified_items( NactIActionsList *instance );
GList *nact_iactions_list_get_selected_items( NactIActionsList *instance );
+gboolean nact_iactions_list_has_exportable( NactIActionsList *instance );
+gboolean nact_iactions_list_has_modified_items( NactIActionsList *instance );
void nact_iactions_list_insert_items( NactIActionsList *instance, GList *items );
gboolean nact_iactions_list_is_expanded( NactIActionsList *instance, const NAObject *item );
gboolean nact_iactions_list_is_filling_list( NactIActionsList *instance );
diff --git a/src/nact/nact-iadvanced-tab.c b/src/nact/nact-iadvanced-tab.c
index 031c52c..a0771de 100644
--- a/src/nact/nact-iadvanced-tab.c
+++ b/src/nact/nact-iadvanced-tab.c
@@ -67,7 +67,7 @@ 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_updated( NactIAdvancedTab *instance, gint count_selected );
+static void on_tab_updatable_selection_changed( NactIAdvancedTab *instance, gint count_selected );
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 );
@@ -283,8 +283,8 @@ runtime_init_connect_signals( NactIAdvancedTab *instance, GtkTreeView *listview
g_signal_connect(
G_OBJECT( instance ),
- TAB_UPDATABLE_SIGNAL_SELECTION_UPDATED,
- G_CALLBACK( on_tab_updatable_selection_updated ),
+ TAB_UPDATABLE_SIGNAL_SELECTION_CHANGED,
+ G_CALLBACK( on_tab_updatable_selection_changed ),
instance );
}
@@ -352,9 +352,9 @@ nact_iadvanced_tab_get_schemes( NactIAdvancedTab *instance )
}
static void
-on_tab_updatable_selection_updated( NactIAdvancedTab *instance, gint count_selected )
+on_tab_updatable_selection_changed( NactIAdvancedTab *instance, gint count_selected )
{
- static const gchar *thisfn = "nact_iadvanced_tab_on_tab_updatable_selection_updated";
+ static const gchar *thisfn = "nact_iadvanced_tab_on_tab_updatable_selection_changed";
NAObjectProfile *profile = NULL;
GtkTreeModel *scheme_model;
GSList *schemes;
@@ -531,6 +531,7 @@ on_remove_scheme_clicked( GtkButton *button, NactIAdvancedTab *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 );
}
g_free( scheme );
@@ -538,8 +539,6 @@ on_remove_scheme_clicked( GtkButton *button, NactIAdvancedTab *instance )
g_list_foreach( selected_values_path, ( GFunc ) gtk_tree_path_free, NULL );
g_list_free( selected_values_path );
-
- /*g_signal_emit_by_name( G_OBJECT( window ), NACT_SIGNAL_MODIFIED_FIELD );*/
}
static void
@@ -571,11 +570,10 @@ on_scheme_keyword_edited( GtkCellRendererText *renderer, const gchar *path, cons
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 );
}
g_free( old_text );
-
- /*g_signal_emit_by_name( G_OBJECT( window ), NACT_SIGNAL_MODIFIED_FIELD );*/
}
static void
@@ -631,7 +629,7 @@ on_scheme_selection_toggled( GtkCellRendererToggle *renderer, gchar *path, NactI
g_free( scheme );
- /*g_signal_emit_by_name( G_OBJECT( window ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
}
}
diff --git a/src/nact/nact-icommand-tab.c b/src/nact/nact-icommand-tab.c
index 3dcfa84..013c0bf 100644
--- a/src/nact/nact-icommand-tab.c
+++ b/src/nact/nact-icommand-tab.c
@@ -69,7 +69,7 @@ static GType register_type( void );
static void interface_base_init( NactICommandTabInterface *klass );
static void interface_base_finalize( NactICommandTabInterface *klass );
-static void on_tab_updatable_selection_updated( NactICommandTab *instance, gint count_selected );
+static void on_tab_updatable_selection_changed( NactICommandTab *instance, gint count_selected );
static void check_for_label( NactICommandTab *instance, GtkEntry *entry, const gchar *label );
static GtkWidget *get_label_entry( NactICommandTab *instance );
static GtkButton *get_legend_button( NactICommandTab *instance );
@@ -224,8 +224,8 @@ nact_icommand_tab_runtime_init_toplevel( NactICommandTab *instance )
g_signal_connect(
G_OBJECT( instance ),
- TAB_UPDATABLE_SIGNAL_SELECTION_UPDATED,
- G_CALLBACK( on_tab_updatable_selection_updated ),
+ TAB_UPDATABLE_SIGNAL_SELECTION_CHANGED,
+ G_CALLBACK( on_tab_updatable_selection_changed ),
instance );
}
@@ -266,9 +266,9 @@ nact_icommand_tab_has_label( NactICommandTab *instance )
}
static void
-on_tab_updatable_selection_updated( NactICommandTab *instance, gint count_selected )
+on_tab_updatable_selection_changed( NactICommandTab *instance, gint count_selected )
{
- static const gchar *thisfn = "nact_icommand_tab_on_tab_updatable_selection_updated";
+ static const gchar *thisfn = "nact_icommand_tab_on_tab_updatable_selection_changed";
NAObjectProfile *profile = NULL;
GtkWidget *label_entry, *path_entry, *parameters_entry;
gchar *label, *path, *parameters;
@@ -429,7 +429,7 @@ on_label_changed( GtkEntry *entry, NactICommandTab *instance )
if( edited ){
label = gtk_entry_get_text( entry );
na_object_set_label( edited, label );
- /*g_signal_emit_by_name( G_OBJECT( window ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
check_for_label( instance, entry, label );
}
}
@@ -457,7 +457,7 @@ on_parameters_changed( GtkEntry *entry, NactICommandTab *instance )
if( edited ){
na_object_profile_set_parameters( edited, gtk_entry_get_text( entry ));
- /*g_signal_emit_by_name( G_OBJECT( window ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
}
update_example_label( instance, edited );
@@ -523,7 +523,7 @@ on_path_changed( GtkEntry *entry, NactICommandTab *instance )
if( edited ){
na_object_profile_set_path( edited, gtk_entry_get_text( entry ));
- /*g_signal_emit_by_name( G_OBJECT( window ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
}
update_example_label( instance, edited );
diff --git a/src/nact/nact-iconditions-tab.c b/src/nact/nact-iconditions-tab.c
index d72936b..08459fd 100644
--- a/src/nact/nact-iconditions-tab.c
+++ b/src/nact/nact-iconditions-tab.c
@@ -55,7 +55,7 @@ static GType register_type( void );
static void interface_base_init( NactIConditionsTabInterface *klass );
static void interface_base_finalize( NactIConditionsTabInterface *klass );
-static void on_tab_updatable_selection_updated( NactIConditionsTab *instance, gint count_selected );
+static void on_tab_updatable_selection_changed( NactIConditionsTab *instance, gint count_selected );
static GtkWidget *get_basenames_entry( NactIConditionsTab *instance );
static GtkButton *get_both_button( NactIConditionsTab *instance );
static GtkButton *get_isdir_button( NactIConditionsTab *instance );
@@ -210,8 +210,8 @@ nact_iconditions_tab_runtime_init_toplevel( NactIConditionsTab *instance )
g_signal_connect(
G_OBJECT( instance ),
- TAB_UPDATABLE_SIGNAL_SELECTION_UPDATED,
- G_CALLBACK( on_tab_updatable_selection_updated ),
+ TAB_UPDATABLE_SIGNAL_SELECTION_CHANGED,
+ G_CALLBACK( on_tab_updatable_selection_changed ),
instance );
}
@@ -257,9 +257,9 @@ nact_iconditions_tab_get_multiple( NactIConditionsTab *instance )
}
static void
-on_tab_updatable_selection_updated( NactIConditionsTab *instance, gint count_selected )
+on_tab_updatable_selection_changed( NactIConditionsTab *instance, gint count_selected )
{
- static const gchar *thisfn = "nact_iconditions_tab_on_tab_updatable_selection_updated";
+ static const gchar *thisfn = "nact_iconditions_tab_on_tab_updatable_selection_changed";
NAObjectProfile *profile;
GtkWidget *basenames_widget, *mimetypes_widget;
GSList *basenames, *mimetypes;
@@ -374,7 +374,7 @@ on_basenames_changed( GtkEntry *entry, NactIConditionsTab *instance )
basenames = na_utils_text_to_string_list( text );
na_object_profile_set_basenames( edited, basenames );
na_utils_free_string_list( basenames );
- /*g_signal_emit_by_name( G_OBJECT( instance ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
}
}
@@ -398,7 +398,7 @@ on_isfiledir_toggled( GtkToggleButton *button, NactIConditionsTab *instance )
if( edited ){
nact_iconditions_tab_get_isfiledir( instance, &isfile, &isdir );
na_object_profile_set_isfiledir( edited, isfile, isdir );
- /*g_signal_emit_by_name( G_OBJECT( instance ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
}
}
@@ -416,7 +416,7 @@ on_matchcase_toggled( GtkToggleButton *button, NactIConditionsTab *instance )
if( edited ){
matchcase = gtk_toggle_button_get_active( button );
na_object_profile_set_matchcase( edited, matchcase );
- /*g_signal_emit_by_name( G_OBJECT( instance ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
}
}
@@ -437,7 +437,7 @@ on_mimetypes_changed( GtkEntry *entry, NactIConditionsTab *instance )
mimetypes = na_utils_text_to_string_list( text );
na_object_profile_set_mimetypes( edited, mimetypes );
na_utils_free_string_list( mimetypes );
- /*g_signal_emit_by_name( G_OBJECT( instance ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
}
}
@@ -455,7 +455,7 @@ on_multiple_toggled( GtkToggleButton *button, NactIConditionsTab *instance )
if( edited ){
multiple = gtk_toggle_button_get_active( button );
na_object_profile_set_multiple( edited, multiple );
- /*g_signal_emit_by_name( G_OBJECT( instance ), NACT_SIGNAL_MODIFIED_FIELD );*/
+ g_signal_emit_by_name( G_OBJECT( instance ), TAB_UPDATABLE_SIGNAL_ITEM_UPDATED, edited );
}
}
diff --git a/src/nact/nact-main-menubar.c b/src/nact/nact-main-menubar.c
index d323003..7af1d8b 100644
--- a/src/nact/nact-main-menubar.c
+++ b/src/nact/nact-main-menubar.c
@@ -54,7 +54,7 @@
#define MENUBAR_PROP_UI_MANAGER "nact-menubar-ui-manager"
#define MENUBAR_PROP_ACTIONS_GROUP "nact-menubar-actions-group"
-static void on_tab_updatable_selection_updated( NactMainWindow *window, gint count_selected );
+static void on_tab_updatable_selection_changed( NactMainWindow *window, gint count_selected );
static void on_new_menu_activated( GtkAction *action, NactMainWindow *window );
static void on_new_action_activated( GtkAction *action, NactMainWindow *window );
@@ -235,8 +235,8 @@ nact_main_menubar_runtime_init( NactMainWindow *window )
base_window_signal_connect(
BASE_WINDOW( window ),
G_OBJECT( window ),
- TAB_UPDATABLE_SIGNAL_SELECTION_UPDATED,
- G_CALLBACK( on_tab_updatable_selection_updated ));
+ TAB_UPDATABLE_SIGNAL_SELECTION_CHANGED,
+ G_CALLBACK( on_tab_updatable_selection_changed ));
}
/**
@@ -265,7 +265,7 @@ nact_main_menubar_refresh_actions_sensitivity( NactMainWindow *window )
}
static void
-on_tab_updatable_selection_updated( NactMainWindow *window, gint count_selected )
+on_tab_updatable_selection_changed( NactMainWindow *window, gint count_selected )
{
refresh_actions_sensitivity_with_count( window, count_selected );
}
@@ -417,14 +417,14 @@ static void
on_quit_activated( GtkAction *gtk_action, NactMainWindow *window )
{
static const gchar *thisfn = "nact_main_menubar_on_quit_activated";
- gint count;
+ gboolean has_modified;
g_debug( "%s: item=%p, window=%p", thisfn, ( void * ) gtk_action, ( void * ) window );
g_return_if_fail( GTK_IS_ACTION( gtk_action ) || gtk_action == NULL );
g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
- count = nact_main_window_get_modified_items_count( window );
- if( !count || nact_window_warn_count_modified( NACT_WINDOW( window ), count )){
+ has_modified = nact_main_window_has_modified_items( window );
+ if( !has_modified || nact_window_warn_modified( NACT_WINDOW( window ))){
g_object_unref( window );
}
}
@@ -450,10 +450,12 @@ on_cut_activated( GtkAction *gtk_action, NactMainWindow *window )
items = nact_iactions_list_get_selected_items( NACT_IACTIONS_LIST( window ));
nact_iactions_list_delete_selection( NACT_IACTIONS_LIST( window ), &path );
nact_main_window_move_to_deleted( window, items );
- nact_clipboard_set( items, FALSE );
+ nact_clipboard_primary_set( items, FALSE );
nact_iactions_list_select_row( NACT_IACTIONS_LIST( window ), path );
- g_list_free( items );
+ /* do not unref selected items as the ref has been moved to main_deleted
+ */
+ /*g_list_free( items );*/
}
/*
@@ -473,7 +475,7 @@ on_copy_activated( GtkAction *gtk_action, NactMainWindow *window )
g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
items = nact_iactions_list_get_selected_items( NACT_IACTIONS_LIST( window ));
- nact_clipboard_set( items, TRUE );
+ nact_clipboard_primary_set( items, TRUE );
na_object_free_items( items );
nact_main_menubar_refresh_actions_sensitivity( window );
}
@@ -494,7 +496,7 @@ on_paste_activated( GtkAction *gtk_action, NactMainWindow *window )
{
GList *items;
- items = nact_clipboard_get();
+ items = nact_clipboard_primary_get();
nact_iactions_list_insert_items( NACT_IACTIONS_LIST( window ), items );
na_object_free_items( items );
}
@@ -664,9 +666,10 @@ refresh_actions_sensitivity_with_count( NactMainWindow *window, gint count_selec
static const gchar *thisfn = "nact_main_menubar_refresh_actions_sensitivity_with_count";
NAObjectItem *item;
NAObjectProfile *profile;
- /*guint count_all;*/
- guint count_modified;
- gboolean is_clipboard_empty;
+ gboolean has_exportable;
+ gboolean has_modified;
+ guint nb_actions, nb_profiles, nb_menus;
+ gboolean paste_enabled;
g_debug( "%s: window=%p, count_selected=%d", thisfn, ( void * ) window, count_selected );
g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
@@ -677,31 +680,40 @@ refresh_actions_sensitivity_with_count( NactMainWindow *window, gint count_selec
TAB_UPDATABLE_PROP_EDITED_PROFILE, &profile,
NULL );
- /* TODO: replace count_all by is_empty */
- /*count_all = nact_main_window_get_all_items_count( window );*/
- count_modified = nact_main_window_get_modified_items_count( window );
- is_clipboard_empty = nact_clipboard_is_empty();
+ has_exportable = nact_iactions_list_has_exportable( NACT_IACTIONS_LIST( window ));
+ has_modified = nact_main_window_has_modified_items( window );
+
+ paste_enabled = FALSE;
+ nact_clipboard_primary_counts( &nb_actions, &nb_profiles, &nb_menus );
+ g_debug( "%s: actions=%d, profiles=%d, menus=%d", thisfn, nb_actions, nb_profiles, nb_menus );
+ if( nb_profiles ){
+ paste_enabled = NA_IS_OBJECT_ACTION( item );
+ } else {
+ paste_enabled = ( nb_actions + nb_menus > 0 );
+ }
/* new menu always enabled */
/* new action always enabled */
/* new profile enabled if selection is relative to only one action */
enable_item( window, "NewProfileItem", item != NULL && !NA_IS_OBJECT_MENU( item ));
/* save enabled if at least one item has been modified */
- enable_item( window, "SaveItem", count_modified > 0 );
+ enable_item( window, "SaveItem", has_modified );
/* quit always enabled */
/* cut/copy enabled if selection not empty */
enable_item( window, "CutItem", count_selected > 0 );
enable_item( window, "CopyItem", count_selected > 0 );
- /* paste enabled if clipboard not empty */
- enable_item( window, "PasteItem", !is_clipboard_empty );
+ /* paste enabled if
+ * - clipboard contains only profiles, and current selection is action or profile
+ * - clipboard contains actions or menus */
+ enable_item( window, "PasteItem", paste_enabled );
/* duplicate/delete enabled if selection not empty */
enable_item( window, "DuplicateItem", count_selected > 0 );
enable_item( window, "DeleteItem", count_selected > 0 );
/* reload items always enabled */
/* preferences always enabled */
/* import item always enabled */
- /* export item enabled if IActionsList not empty */
- enable_item( window, "ExportItem", FALSE /*count_all > 0*/ );
+ /* export item enabled if IActionsList store contains actions */
+ enable_item( window, "ExportItem", has_exportable );
/* TODO: help temporarily disabled */
enable_item( window, "HelpItem", FALSE );
/* about always enabled */
diff --git a/src/nact/nact-main-tab.h b/src/nact/nact-main-tab.h
index d52306c..7936964 100644
--- a/src/nact/nact-main-tab.h
+++ b/src/nact/nact-main-tab.h
@@ -38,7 +38,8 @@
/* signals
*/
-#define TAB_UPDATABLE_SIGNAL_SELECTION_UPDATED "nact-tab-updatable-selection-updated"
+#define TAB_UPDATABLE_SIGNAL_SELECTION_CHANGED "nact-tab-updatable-selection-changed"
+#define TAB_UPDATABLE_SIGNAL_ITEM_UPDATED "nact-tab-updatable-item-updated"
G_END_DECLS
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 1284ff3..08384d4 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -79,18 +79,6 @@ struct NactMainWindowPrivate {
NAObjectItem *edited_item;
/**
- * Edition status for the edited action or menu.
- *
- * Menu is always editable as only displayed if it is the currently
- * selected item.
- *
- * Action is only enable if the action itself, or an action with
- * only one profile, is currently selected
- */
- /* TODO: remove this variable */
- /*gboolean edition_enabled;*/
-
- /**
* Currently edited profile.
*
* This is the profile which is displayed in tabs Command,
@@ -114,7 +102,8 @@ enum {
/* signals
*/
enum {
- SELECTION_UPDATED,
+ SELECTION_CHANGED,
+ ITEM_UPDATED,
LAST_SIGNAL
};
@@ -148,6 +137,8 @@ static void iactions_list_selection_changed( NactIActionsList *instance, GSL
static void set_current_object_item( NactMainWindow *window, GSList *selected_items );
static void set_current_profile( NactMainWindow *window, gboolean set_action, GSList *selected_items );
+static void on_tab_updatable_item_updated( NactMainWindow *window, gpointer user_data );
+
static void ipivot_consumer_on_actions_changed( NAIPivotConsumer *instance, gpointer user_data );
static void ipivot_consumer_on_display_order_changed( NAIPivotConsumer *instance, gpointer user_data );
@@ -269,13 +260,6 @@ class_init( NactMainWindowClass *klass )
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE );
g_object_class_install_property( object_class, PROP_EDITED_ITEM, spec );
- /*spec = g_param_spec_boolean(
- TAB_UPDATABLE_PROP_EDITION_ACTION_ENABLED,
- "Edition enabled",
- "Whether editing the characteristics of NAObjectItem is allowed", FALSE,
- G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE );
- g_object_class_install_property( object_class, PROP_ITEM_EDITION_ENABLED, spec );*/
-
spec = g_param_spec_pointer(
TAB_UPDATABLE_PROP_EDITED_PROFILE,
"Edited NAObjectProfile",
@@ -290,13 +274,43 @@ class_init( NactMainWindowClass *klass )
base_class->get_iprefs_window_id = base_get_iprefs_window_id;
/**
- * "nact-tab-updatable-selection-updated":
+ * nact-tab-updatable-selection-changed:
+ *
+ * This signal is emitted by this main window, in response of a
+ * change of the selection in IActionsList.
+ * Notebook tabs should connect to this signal and update their
+ * display to reflect the content of the new selection.
+ *
+ * Note also that, where this main window will receive from
+ * IActionsList the full list of currently selected items, this
+ * signal only carries to the tabs the count of selected items.
+ *
+ * See #iactions_list_selection_changed().
+ */
+ st_signals[ SELECTION_CHANGED ] = g_signal_new(
+ TAB_UPDATABLE_SIGNAL_SELECTION_CHANGED,
+ G_TYPE_OBJECT,
+ G_SIGNAL_RUN_LAST,
+ 0, /* no default handler */
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_POINTER );
+
+ /**
+ * nact-tab-updatable-item-updated:
*
- * This signal is emitted to inform updatable tabs that a new
- * item has been selected, and the displays should reflect it.
+ * This signal is emitted by the notebook tabs, when any property
+ * of an item has been modified.
+ *
+ * This main window is rather the only consumer of this message,
+ * does its tricks (title, etc.), and then reforward an item-updated
+ * message to IActionsList.
*/
- st_signals[ SELECTION_UPDATED ] = g_signal_new(
- TAB_UPDATABLE_SIGNAL_SELECTION_UPDATED,
+ st_signals[ ITEM_UPDATED ] = g_signal_new(
+ TAB_UPDATABLE_SIGNAL_ITEM_UPDATED,
G_TYPE_OBJECT,
G_SIGNAL_RUN_LAST,
0, /* no default handler */
@@ -400,6 +414,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED,
G_CALLBACK( on_base_all_widgets_showed ));
+ base_window_signal_connect(
+ BASE_WINDOW( instance ),
+ G_OBJECT( instance ),
+ TAB_UPDATABLE_SIGNAL_ITEM_UPDATED,
+ G_CALLBACK( on_tab_updatable_item_updated ));
+
self->private->dispose_has_run = FALSE;
}
@@ -416,10 +436,6 @@ instance_get_property( GObject *object, guint property_id, GValue *value, GParam
g_value_set_pointer( value, self->private->edited_item );
break;
- /*case PROP_ITEM_EDITION_ENABLED:
- g_value_set_boolean( value, self->private->edition_enabled );
- break;*/
-
case PROP_EDITED_PROFILE:
g_value_set_pointer( value, self->private->edited_profile );
break;
@@ -443,10 +459,6 @@ instance_set_property( GObject *object, guint property_id, const GValue *value,
self->private->edited_item = g_value_get_pointer( value );
break;
- /*case PROP_ITEM_EDITION_ENABLED:
- self->private->edition_enabled = g_value_get_boolean( value );
- break;*/
-
case PROP_EDITED_PROFILE:
self->private->edited_profile = g_value_get_pointer( value );
break;
@@ -471,6 +483,8 @@ instance_dispose( GObject *window )
if( !self->private->dispose_has_run ){
+ self->private->dispose_has_run = TRUE;
+
pane = base_window_get_widget( BASE_WINDOW( window ), "MainPaned" );
pos = gtk_paned_get_position( GTK_PANED( pane ));
base_iprefs_set_int( BASE_WINDOW( window ), "main-paned", pos );
@@ -487,8 +501,6 @@ instance_dispose( GObject *window )
if( G_OBJECT_CLASS( st_parent_class )->dispose ){
G_OBJECT_CLASS( st_parent_class )->dispose( window );
}
-
- self->private->dispose_has_run = TRUE;
}
}
@@ -554,10 +566,10 @@ nact_main_window_action_exists( const NactMainWindow *window, const gchar *uuid
}
/**
- * nact_main_window_get_modified_items_count:
+ * nact_main_window_has_modified_items:
* @window: this #NactMainWindow instance.
*
- * Returns: a count of modified items.
+ * Returns: %TRUE if there is at least one modified item in IActionsList.
*
* Note that exact count of modified actions is subject to some
* approximation:
@@ -567,30 +579,31 @@ nact_main_window_action_exists( const NactMainWindow *window, const gchar *uuid
* if we have eventually deleted all newly created actions, then the
* final count of modified actions should be zero... don't it ?
*/
-guint
-nact_main_window_get_modified_items_count( const NactMainWindow *window )
+gboolean
+nact_main_window_has_modified_items( const NactMainWindow *window )
{
- static const gchar *thisfn = "nact_main_window_get_modified_items_count";
- GList *ia, *modified;
+ static const gchar *thisfn = "nact_main_window_has_modified_items";
+ GList *ia;
gint count_deleted = 0;
- gint count_modified = 0;
+ gboolean has_modified = FALSE;
+
+ g_return_val_if_fail( NACT_IS_MAIN_WINDOW( window ), FALSE );
+ g_return_val_if_fail( NACT_IS_IACTIONS_LIST( window ), FALSE );
- g_return_val_if_fail( NACT_IS_MAIN_WINDOW( window ), 0 );
- g_return_val_if_fail( NACT_IS_IACTIONS_LIST( window ), 0 );
+ if( !window->private->dispose_has_run ){
- for( ia = window->private->deleted ; ia ; ia = ia->next ){
- if( na_object_get_origin( NA_OBJECT( ia->data )) != NULL ){
- count_deleted += 1;
+ for( ia = window->private->deleted ; ia ; ia = ia->next ){
+ if( na_object_get_origin( NA_OBJECT( ia->data )) != NULL ){
+ count_deleted += 1;
+ }
}
- }
- g_debug( "%s: count_deleted=%d", thisfn, count_deleted );
+ g_debug( "%s: count_deleted=%d", thisfn, count_deleted );
- modified = nact_iactions_list_get_modified_items( NACT_IACTIONS_LIST( window ));
- count_modified = g_list_length( modified );
- na_object_free_items( modified );
- g_debug( "%s: count_modified=%d", thisfn, count_modified );
+ has_modified = nact_iactions_list_has_modified_items( NACT_IACTIONS_LIST( window ));
+ g_debug( "%s: has_modified=%s", thisfn, has_modified ? "True":"False" );
+ }
- return( count_deleted + count_modified );
+ return( count_deleted > 0 || has_modified );
}
/**
@@ -602,7 +615,7 @@ nact_main_window_get_modified_items_count( const NactMainWindow *window )
*
* Note that we move the ref from @items list to our own deleted list.
* So that the caller should not try to na_object_free_items() the
- * provided list, but should also g_slist_free() it.
+ * provided list.
*/
void
nact_main_window_move_to_deleted( NactMainWindow *window, GList *items )
@@ -774,7 +787,7 @@ on_base_all_widgets_showed( NactMainWindow *window, gpointer user_data )
static void
iactions_list_selection_changed( NactIActionsList *instance, GSList *selected_items )
{
- static const gchar *thisfn = "nact_main_window_list_actions_selection_changed";
+ static const gchar *thisfn = "nact_main_window_iactions_list_selection_changed";
NactMainWindow *window;
NAObject *object;
gint count;
@@ -786,6 +799,10 @@ iactions_list_selection_changed( NactIActionsList *instance, GSList *selected_it
window = NACT_MAIN_WINDOW( instance );
+ if( window->private->dispose_has_run ){
+ return;
+ }
+
if( count == 1 ){
object = NA_OBJECT( selected_items->data );
if( NA_IS_OBJECT_ITEM( object )){
@@ -806,11 +823,10 @@ iactions_list_selection_changed( NactIActionsList *instance, GSList *selected_it
g_object_set(
G_OBJECT( window ),
TAB_UPDATABLE_PROP_EDITED_ACTION, window->private->edited_item,
- /*TAB_UPDATABLE_PROP_EDITION_ACTION_ENABLED, window->private->edition_enabled,*/
TAB_UPDATABLE_PROP_EDITED_PROFILE, window->private->edited_profile,
NULL );
- g_signal_emit_by_name( window, TAB_UPDATABLE_SIGNAL_SELECTION_UPDATED, GINT_TO_POINTER( count ));
+ g_signal_emit_by_name( window, TAB_UPDATABLE_SIGNAL_SELECTION_CHANGED, GINT_TO_POINTER( count ));
}
/*
@@ -890,6 +906,20 @@ set_current_profile( NactMainWindow *window, gboolean set_action, GSList *select
}
}
+static void
+on_tab_updatable_item_updated( NactMainWindow *window, gpointer user_data )
+{
+ static const gchar *thisfn = "on_tab_updatable_item_updated";
+
+ g_debug( "%s: window=%p, user_data=%p", thisfn, ( void * ) window, ( void * ) user_data );
+ g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
+
+ if( !window->private->dispose_has_run ){
+
+ g_signal_emit_by_name( window, IACTIONS_LIST_SIGNAL_ITEM_UPDATED, NULL );
+ }
+}
+
/*
* called by NAPivot because this window implements the IIOConsumer
* interface, i.e. it wish to be advertised when the list of actions
@@ -918,7 +948,7 @@ ipivot_consumer_on_actions_changed( NAIPivotConsumer *instance, gpointer user_da
"You could keep to work with your current list of actions, "
"or you may want to reload a fresh one." ));
- if( nact_main_window_get_modified_items_count( NACT_MAIN_WINDOW( instance )) > 0 ){
+ if( nact_main_window_has_modified_items( NACT_MAIN_WINDOW( instance ))){
gchar *tmp = g_strdup_printf( "%s\n\n%s", first,
_( "Note that reloading a fresh list of actions requires "
"that you give up with your current modifications." ));
diff --git a/src/nact/nact-main-window.h b/src/nact/nact-main-window.h
index 0fe2c48..9ca948d 100644
--- a/src/nact/nact-main-window.h
+++ b/src/nact/nact-main-window.h
@@ -69,7 +69,7 @@ GType nact_main_window_get_type( void );
NactMainWindow *nact_main_window_new( BaseApplication *application );
gboolean nact_main_window_action_exists( const NactMainWindow *window, const gchar *uuid );
-guint nact_main_window_get_modified_items_count( const NactMainWindow *window );
+gboolean nact_main_window_has_modified_items( const NactMainWindow *window );
void nact_main_window_move_to_deleted( NactMainWindow *window, GList *items );
void nact_main_window_remove_deleted( NactMainWindow *window );
diff --git a/src/nact/nact-window.c b/src/nact/nact-window.c
index 0698738..8c47614 100644
--- a/src/nact/nact-window.c
+++ b/src/nact/nact-window.c
@@ -331,33 +331,22 @@ nact_window_count_level_zero_items( GList *items, guint *actions, guint *profile
}
/**
- * Emits a warning if the action has been modified.
- *
- * @window: this NactWindow object.
- *
- * @count
+ * nact_window_warn_modified:
+ * @window: this #NactWindow instance.
*
- * Returns TRUE if the user confirms he wants to quit.
+ * Emits a warning if the action has been modified.
*
- * Note: the count of modified actions is subject to some approximation.
- * So, just say that 'actions have been modified'
+ * Returns: %TRUE if the user confirms he wants to quit.
*/
gboolean
-nact_window_warn_count_modified( NactWindow *window, gint count )
+nact_window_warn_modified( NactWindow *window )
{
gchar *first;
gchar *second;
gboolean ok;
- if( count == 1 ){
- first = g_strdup_printf( _( "One action has been modified." ));
- second = g_strdup( _( "Are you sure you want to quit without saving it ?" ));
-
- } else {
- /*first = g_strdup_printf( _( "%d actions have been modified." ), count );*/
- first = g_strdup_printf( _( "Actions have been modified." ));
- second = g_strdup( _( "Are you sure you want to quit without saving them ?" ));
- }
+ first = g_strdup_printf( _( "Some items have been modified." ));
+ second = g_strdup( _( "Are you sure you want to quit without saving them ?" ));
ok = base_window_yesno_dlg( BASE_WINDOW( window ), GTK_MESSAGE_QUESTION, first, second );
diff --git a/src/nact/nact-window.h b/src/nact/nact-window.h
index 0bd49bb..2d403d1 100644
--- a/src/nact/nact-window.h
+++ b/src/nact/nact-window.h
@@ -89,7 +89,7 @@ gboolean nact_window_delete_object_item( NactWindow *window, NAObjectItem *item
void nact_window_write_level_zero( NactWindow *window, GList *items );
void nact_window_count_level_zero_items( GList *items, guint *actions, guint *profiles, guint *menus );
-gboolean nact_window_warn_count_modified( NactWindow *window, gint count );
+gboolean nact_window_warn_modified( NactWindow *window );
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]