summarylogtreecommitdiffstats
path: root/popovers__color-chooser.patch
blob: a216122f4c6382d32791a487286ef2b831114711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --color -U 5 -r -Z -B ./org/gtk/gtkcolorswatch.c ./mod/gtk/gtkcolorswatch.c
--- ./org/gtk/gtkcolorswatch.c	2017-10-02 18:00:49.000000000 +0200
+++ ./mod/gtk/gtkcolorswatch.c	2017-10-30 21:46:59.750398031 +0100
@@ -347,10 +347,21 @@
 static void
 do_popup (GtkColorSwatch *swatch)
 {
   if (swatch->priv->popover == NULL)
     {
+      GtkWidget *item;
+      swatch->priv->popover = gtk_menu_new ();
+      item = gtk_menu_item_new_with_mnemonic (_ ("C_ustomize"));
+      g_signal_connect_swapped (item, "activate", G_CALLBACK (emit_customize), swatch);
+      gtk_widget_set_visible (GTK_WIDGET (item), TRUE);
+      gtk_menu_shell_append (GTK_MENU_SHELL (swatch->priv->popover), item);
+    }
+  gtk_menu_popup_at_pointer (GTK_MENU (swatch->priv->popover), NULL);
+  return;
+  if (swatch->priv->popover == NULL)
+    {
       GtkWidget *box;
       GtkWidget *item;
 
       swatch->priv->popover = gtk_popover_new (GTK_WIDGET (swatch));
       box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);