[nautilus-actions] Connect to delete-event signal to hide the GtkWindow
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Connect to delete-event signal to hide the GtkWindow
- Date: Mon, 5 Jul 2010 20:38:16 +0000 (UTC)
commit c162a6d6cabb1bfe026e3e44cab5887655251f18
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon Jul 5 22:37:54 2010 +0200
Connect to delete-event signal to hide the GtkWindow
ChangeLog | 5 +++++
TODO | 2 --
src/nact/nact-icommand-tab.c | 17 +++++++++++++++++
3 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d000b7e..0021189 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-05 Pierre Wieser <pwieser trychlos org>
+
+ * src/nact/nact-icommand-tab.c (nact_icommand_tab_runtime_init_toplevel):
+ Connect to delete-event signal to hide the GtkWindow.
+
2010-07-03 Pierre Wieser <pwieser trychlos org>
* src/nact/nact-add-capability-dialog.c (on_base_runtime_init_dialog):
diff --git a/TODO b/TODO
index 97f0f2e..bca51d6 100644
--- a/TODO
+++ b/TODO
@@ -499,5 +499,3 @@ Parameter Description
- 2010-07-02: bug 'wipe selected' action has a '%M' parameter which should have been converted at import time
-- 2010-07-02: legend dialog: may be closed with the legend button kept toggled -> inconsistency
-
diff --git a/src/nact/nact-icommand-tab.c b/src/nact/nact-icommand-tab.c
index 44f46ea..c23cf5c 100644
--- a/src/nact/nact-icommand-tab.c
+++ b/src/nact/nact-icommand-tab.c
@@ -93,6 +93,7 @@ static void legend_dialog_show( NactICommandTab *instance );
static void legend_dialog_hide( NactICommandTab *instance );
static void on_label_changed( GtkEntry *entry, NactICommandTab *instance );
static void on_legend_clicked( GtkButton *button, NactICommandTab *instance );
+static gboolean on_legend_dialog_deleted( GtkWidget *dialog, GdkEvent *event, NactICommandTab *instance );
static void on_parameters_changed( GtkEntry *entry, NactICommandTab *instance );
static void on_path_browse( GtkButton *button, NactICommandTab *instance );
static void on_path_changed( GtkEntry *entry, NactICommandTab *instance );
@@ -209,6 +210,7 @@ void
nact_icommand_tab_runtime_init_toplevel( NactICommandTab *instance )
{
static const gchar *thisfn = "nact_icommand_tab_runtime_init_toplevel";
+ GtkWindow *legend_dialog;
GtkWidget *label_entry, *path_entry, *parameters_entry, *wdir_entry;
GtkButton *path_button, *legend_button, *wdir_button;
@@ -253,6 +255,13 @@ nact_icommand_tab_runtime_init_toplevel( NactICommandTab *instance )
"clicked",
G_CALLBACK( on_legend_clicked ));
+ legend_dialog = get_legend_dialog( instance );
+ base_window_signal_connect(
+ BASE_WINDOW( instance ),
+ G_OBJECT( legend_dialog ),
+ "delete-event",
+ G_CALLBACK( on_legend_dialog_deleted ));
+
wdir_entry = base_window_get_widget( BASE_WINDOW( instance ), "WorkingDirectoryEntry" );
base_window_signal_connect(
BASE_WINDOW( instance ),
@@ -544,6 +553,14 @@ on_legend_clicked( GtkButton *button, NactICommandTab *instance )
}
}
+static gboolean
+on_legend_dialog_deleted( GtkWidget *dialog, GdkEvent *event, NactICommandTab *instance )
+{
+ /*g_debug( "on_legend_dialog_deleted" );*/
+ legend_dialog_hide( instance );
+ return( TRUE );
+}
+
static void
on_parameters_changed( GtkEntry *entry, NactICommandTab *instance )
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]