[gnome-panel/wip/free-the-fish: 8/8] Free-the-fish: Allow stopping the fish
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip/free-the-fish: 8/8] Free-the-fish: Allow stopping the fish
- Date: Tue, 2 Jun 2015 11:03:19 +0000 (UTC)
commit 0583e9f49c7900cbb2aac34c7d2f05a915c1b5f6
Author: Sebastian Geiger <sbastig gmx net>
Date: Mon Jun 1 18:46:48 2015 +0200
Free-the-fish: Allow stopping the fish
gnome-panel/free-the-fish.c | 8 ++++++++
gnome-panel/free-the-fish.h | 7 ++++++-
gnome-panel/panel-run-dialog.c | 8 +++++++-
3 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/gnome-panel/free-the-fish.c b/gnome-panel/free-the-fish.c
index 0b39d0c..b334978 100644
--- a/gnome-panel/free-the-fish.c
+++ b/gnome-panel/free-the-fish.c
@@ -397,3 +397,11 @@ start_wanda_the_fish(void)
check_screen_timeout (NULL);
}
+
+void
+stop_wanda_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 03f4d45..7a4379f 100644
--- a/gnome-panel/free-the-fish.h
+++ b/gnome-panel/free-the-fish.h
@@ -5,11 +5,16 @@
G_BEGIN_DECLS
-/*
+/**
* This starts the "free the fish" widget. It draws a little fish on the screen that is "swimming" around.
*/
void start_wanda_the_fish (void);
+/**
+ * Catch the fish. Wanda will start moving fast and disappear at the edge of the screen.
+ */
+void stop_wanda_the_fish(void);
+
G_END_DECLS
#endif
diff --git a/gnome-panel/panel-run-dialog.c b/gnome-panel/panel-run-dialog.c
index 7ae3497..315aac3 100644
--- a/gnome-panel/panel-run-dialog.c
+++ b/gnome-panel/panel-run-dialog.c
@@ -528,13 +528,19 @@ panel_run_dialog_execute (PanelRunDialog *dialog)
return;
}
- /* evil eggies, do not translate! */
+ /* These commands are two hidden easter eggs. A fish will appear on the screen and starts swimming
around. */
if (!strcmp (command, "free the fish")) {
start_wanda_the_fish();
g_free (command);
gtk_widget_destroy (dialog->run_dialog);
return;
+ } else if (!strcmp (command, "catch the fish")) {
+ stop_wanda_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]