[gnome-panel/wip/free-the-fish: 10/10] free-the-fish.c: Add a function that allows stopping the fish
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip/free-the-fish: 10/10] free-the-fish.c: Add a function that allows stopping the fish
- Date: Tue, 2 Jun 2015 21:35:42 +0000 (UTC)
commit fdb591750b751b75a71a2c49fb13abcd0a2ac5c1
Author: Sebastian Geiger <sbastig gmx net>
Date: Mon Jun 1 18:46:48 2015 +0200
free-the-fish.c: Add a function that allows stopping the fish
gnome-panel/free-the-fish.c | 8 ++++++++
gnome-panel/free-the-fish.h | 2 ++
gnome-panel/panel-run-dialog.c | 8 +++++++-
3 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/gnome-panel/free-the-fish.c b/gnome-panel/free-the-fish.c
index 20857dc..4907e00 100644
--- a/gnome-panel/free-the-fish.c
+++ b/gnome-panel/free-the-fish.c
@@ -386,3 +386,11 @@ free_the_fish (void)
check_screen_timeout (NULL);
}
+
+void
+catch_the_fish (void)
+{
+ if (screen_check_id > 0)
+ g_source_remove (screen_check_id);
+ fish_start_hide_mode ();
+}
diff --git a/gnome-panel/free-the-fish.h b/gnome-panel/free-the-fish.h
index e4c88e7..12d1c09 100644
--- a/gnome-panel/free-the-fish.h
+++ b/gnome-panel/free-the-fish.h
@@ -7,6 +7,8 @@ G_BEGIN_DECLS
void free_the_fish (void);
+void catch_the_fish (void);
+
G_END_DECLS
#endif
diff --git a/gnome-panel/panel-run-dialog.c b/gnome-panel/panel-run-dialog.c
index 7a2e34c..bb7eacc 100644
--- a/gnome-panel/panel-run-dialog.c
+++ b/gnome-panel/panel-run-dialog.c
@@ -527,7 +527,7 @@ panel_run_dialog_execute (PanelRunDialog *dialog)
g_free (command);
return;
}
-
+
/* evil eggies, do not translate! */
if (!strcmp (command, "free the fish")) {
free_the_fish ();
@@ -535,6 +535,12 @@ panel_run_dialog_execute (PanelRunDialog *dialog)
g_free (command);
gtk_widget_destroy (dialog->run_dialog);
return;
+ } else if (!strcmp (command, "catch the fish")) {
+ catch_the_fish ();
+
+ g_free(command);
+ gtk_widget_destroy(dialog->run_dialog);
+ return;
}
error = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]