[gimp/gtk3-port: 230/233] Revert "Bug 762279 - "Tip of the day" links opens two links"



commit bd14003dad8cd924bfb8661d58c21a1ffbfa4a4d
Author: Michael Natterer <mitch gimp org>
Date:   Sun Mar 20 20:53:28 2016 +0100

    Revert "Bug 762279 - "Tip of the day" links opens two links"
    
    This reverts commit dc33afd95b0a7aec7f6a8a4bf69eb8f0eccf7faf.
    
    That hack is not for gtk3...

 app/dialogs/tips-dialog.c |   28 +++-------------------------
 1 files changed, 3 insertions(+), 25 deletions(-)
---
diff --git a/app/dialogs/tips-dialog.c b/app/dialogs/tips-dialog.c
index e72f80d..dd357e2 100644
--- a/app/dialogs/tips-dialog.c
+++ b/app/dialogs/tips-dialog.c
@@ -42,17 +42,6 @@ enum
   RESPONSE_NEXT     = 2
 };
 
-
-/* eek, see bug 762279 */
-GtkLinkButtonUriFunc
-gtk_link_button_set_uri_hook      (GtkLinkButtonUriFunc func,
-                                   gpointer             data,
-                                   GDestroyNotify       destroy);
-static void  tips_uri_hook        (GtkLinkButton *button,
-                                   const gchar   *link_,
-                                   gpointer       user_data);
-
-
 static void  tips_dialog_set_tip  (GimpTip       *tip);
 static void  tips_dialog_response (GtkWidget     *dialog,
                                    gint           response);
@@ -205,9 +194,6 @@ tips_dialog_create (Gimp *gimp)
   gtk_widget_show (more_button);
   gtk_box_pack_start (GTK_BOX (hbox), more_button, FALSE, FALSE, 0);
 
-  /* this is deprecated but better than showing two URIs, see bug #762279 */
-  gtk_link_button_set_uri_hook (tips_uri_hook, NULL, NULL);
-
   g_signal_connect (more_button, "clicked",
                     G_CALLBACK (more_button_clicked),
                     gimp);
@@ -260,7 +246,9 @@ tips_dialog_set_tip (GimpTip *tip)
 
   gtk_label_set_markup (GTK_LABEL (tip_label), tip->text);
 
-  gtk_link_button_set_visited (GTK_LINK_BUTTON (more_button), FALSE);
+  /*  set the URI to unset the "visited" state  */
+  gtk_link_button_set_uri (GTK_LINK_BUTTON (more_button),
+                           "http://docs.gimp.org/";);
 
   gtk_widget_set_sensitive (more_button, tip->help_id != NULL);
 }
@@ -271,16 +259,6 @@ more_button_clicked (GtkWidget *button,
 {
   GimpTip *tip = current_tip->data;
 
-  g_signal_stop_emission_by_name (button, "clicked");
-
   if (tip->help_id)
     gimp_help (gimp, NULL, NULL, tip->help_id);
 }
-
-static void
-tips_uri_hook (GtkLinkButton *button,
-               const gchar   *link_,
-               gpointer       user_data)
-{
-  /* do nothing */
-}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]