[Xfce4-commits] [xfce/xfce4-panel] 66/73: Fixed list of authors in the About dialog

noreply at xfce.org noreply at xfce.org
Sun Feb 26 16:34:47 CET 2017


This is an automated email from the git hooks/post-receive script.

andrzejr pushed a commit to branch master
in repository xfce/xfce4-panel.

commit 71f040dc8c46694607fe89d4c1f0c2e373aced3b
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Sun Oct 30 00:32:44 2016 +0100

    Fixed list of authors in the About dialog
---
 panel/panel-dialogs.c | 44 +++-----------------------------------------
 panel/panel-window.c  | 19 ++++++++++++++++---
 2 files changed, 19 insertions(+), 44 deletions(-)

diff --git a/panel/panel-dialogs.c b/panel/panel-dialogs.c
index dabea51..3742005 100644
--- a/panel/panel-dialogs.c
+++ b/panel/panel-dialogs.c
@@ -32,32 +32,6 @@
 
 #include <panel/panel-dialogs.h>
 #include <panel/panel-application.h>
-#include <panel/panel-tic-tac-toe.h>
-
-
-
-#if !GTK_CHECK_VERSION (3, 0, 0)
-static void
-panel_dialogs_show_about_email_hook (GtkAboutDialog *dialog,
-                                     const gchar    *uri,
-                                     gpointer        data)
-{
-  GError *error = NULL;
-
-  if (g_strcmp0 ("tictactoe at xfce.org", uri) == 0)
-    {
-      /* open tic-tac-toe */
-      panel_tic_tac_toe_show ();
-    }
-  else if (!gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (dialog)),
-                          uri, gtk_get_current_event_time (), &error))
-    {
-      xfce_dialog_show_error (GTK_WINDOW (dialog), error,
-                              _("Unable to open the e-mail address"));
-      g_error_free (error);
-    }
-}
-#endif
 
 
 
@@ -66,21 +40,9 @@ panel_dialogs_show_about (void)
 {
   gchar **authors;
 
-  authors = g_new0 (gchar *, 4);
-  authors[0] = g_strdup_printf ("%s:\n%s\n",
-                                _("Maintainers"),
-                                "Nick Schermer <nick at xfce.org>");
-  authors[1] = g_strdup_printf ("%s:\n%s\n",
-                                _("Deskbar Mode"),
-                                "Andrzej Radecki <ndrwrdck at gmail.com>");
-  authors[2] = g_strdup_printf ("%s:\n%s\n%s\n",
-                                _("Inactive Maintainers"),
-                                "Jasper Huijsmans <jasper at xfce.org>",
-                                "Tic-tac-toe <tictactoe at xfce.org>");
-
-#if !GTK_CHECK_VERSION (3, 0, 0)
-  gtk_about_dialog_set_email_hook (panel_dialogs_show_about_email_hook, NULL, NULL);
-#endif
+  authors = g_new0 (gchar *, 3);
+  authors[0] = g_strdup ("Nick Schermer <nick at xfce.org>");
+  authors[1] = g_strdup ("Jasper Huijsmans <jasper at xfce.org>");
 
   gtk_show_about_dialog (NULL,
                          "authors", authors,
diff --git a/panel/panel-window.c b/panel/panel-window.c
index cd96dd1..140d439 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -50,6 +50,7 @@
 #include <panel/panel-dbus-service.h>
 #include <panel/panel-plugin-external.h>
 #include <panel/panel-plugin-external-46.h>
+#include <panel/panel-tic-tac-toe.h>
 
 
 
@@ -147,7 +148,8 @@ static void         panel_window_autohide_queue             (PanelWindow      *w
 static void         panel_window_set_autohide               (PanelWindow      *window,
                                                              gboolean          autohide);
 static void         panel_window_menu_popup                 (PanelWindow      *window,
-                                                             guint32           event_time);
+                                                             guint32           event_time,
+                                                             gboolean          show_tic_tac_toe);
 static void         panel_window_plugins_update             (PanelWindow      *window,
                                                              PluginProp        prop);
 static void         panel_window_plugin_set_mode            (GtkWidget        *widget,
@@ -1064,7 +1066,7 @@ panel_window_button_press_event (GtkWidget      *widget,
   else if (event->button == 3
            || (event->button == 1 && modifiers == GDK_CONTROL_MASK))
     {
-      panel_window_menu_popup (window, event->time);
+      panel_window_menu_popup (window, event->time, modifiers == GDK_SHIFT_MASK);
 
       return TRUE;
     }
@@ -2427,7 +2429,8 @@ panel_window_menu_deactivate (GtkMenu     *menu,
 
 static void
 panel_window_menu_popup (PanelWindow *window,
-                         guint32      event_time)
+                         guint32      event_time,
+                         gboolean     show_tic_tac_toe)
 {
   GtkWidget *menu;
   GtkWidget *item;
@@ -2525,6 +2528,16 @@ panel_window_menu_popup (PanelWindow *window,
   gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
   gtk_widget_show (item);
 
+  /* tic tac toe item */
+  if (show_tic_tac_toe)
+    {
+      item = gtk_image_menu_item_new_with_label ("Tic Tac Toe");
+      g_signal_connect (G_OBJECT (item), "activate",
+                        G_CALLBACK (panel_tic_tac_toe_show), NULL);
+      gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+      gtk_widget_show (item);
+    }
+
   gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
                   NULL, NULL, 0, event_time);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list