summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-22 16:49:42 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-22 16:49:42 (EDT)
commitf3c03a8c0bf3f1ff0deb930c402c581bd8e7f906 (patch)
tree4f49e1874638d06e6665fbf576da6dc8a5b7988b
parentb2a0a099cd87f55d75beba763d801b10add0aba3 (diff)
downloadmarquee-f3c03a8c0bf3f1ff0deb930c402c581bd8e7f906.zip
marquee-f3c03a8c0bf3f1ff0deb930c402c581bd8e7f906.tar.gz
marquee-f3c03a8c0bf3f1ff0deb930c402c581bd8e7f906.tar.bz2
MqTab: Save popover in struct
-rw-r--r--src/tab.c7
-rw-r--r--src/tab.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/src/tab.c b/src/tab.c
index e557803..f04dbaf 100644
--- a/src/tab.c
+++ b/src/tab.c
@@ -78,7 +78,6 @@ tab_label_button_press_cb(GtkWidget *widget, GdkEvent *event, MqTab *tab)
GtkWidget *tab_list;
GtkWidget *tab_list_scrolled_window;
GtkWidget *box;
- GtkWidget *popover; /* TODO: Add to MqWindow */
/* Make sure this is a right mouse button press event. */
if (event->type != GDK_BUTTON_PRESS || event->button.button != 3) {
@@ -131,11 +130,11 @@ tab_label_button_press_cb(GtkWidget *widget, GdkEvent *event, MqTab *tab)
TRUE, FALSE, 0);
/* Set up the popover. */
- popover = gtk_popover_new(widget);
- gtk_container_add(GTK_CONTAINER(popover), box);
+ tab->popover = gtk_popover_new(widget);
+ gtk_container_add(GTK_CONTAINER(tab->popover), box);
/* NB: gtk_popover_popup() is new in GTK+ 3.22. */
- gtk_widget_show_all(popover);
+ gtk_widget_show_all(tab->popover);
gtk_widget_hide(tab_list_scrolled_window);
return FALSE;
diff --git a/src/tab.h b/src/tab.h
index 813f3fb..38e8828 100644
--- a/src/tab.h
+++ b/src/tab.h
@@ -40,6 +40,7 @@ typedef struct {
const gchar *title;
guint tab_position;
WebKitWebView *web_view;
+ GtkWidget *popover;
} MqTab;
MqTab *