summaryrefslogtreecommitdiff
path: root/capplets/appearance
diff options
context:
space:
mode:
authortamplan <[email protected]>2020-05-23 11:20:51 +0200
committerRobert Antoni Buj Gelonch <[email protected]>2020-05-26 22:03:15 +0200
commit91a9af4e2f57e52573579168180d5694dbb76ab2 (patch)
tree21a52aa84a08523fb358ce25942b857209a752ed /capplets/appearance
parent6b0fd11cf82b68ad177883deef722e078d851fc4 (diff)
downloadmate-control-center-91a9af4e2f57e52573579168180d5694dbb76ab2.tar.bz2
mate-control-center-91a9af4e2f57e52573579168180d5694dbb76ab2.tar.xz
Add tab scrolling support for GTK3
mate-window-properties and mate-appearance-properties
Diffstat (limited to 'capplets/appearance')
-rw-r--r--capplets/appearance/appearance-main.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/capplets/appearance/appearance-main.c b/capplets/appearance/appearance-main.c
index 3d401d4b..031040d8 100644
--- a/capplets/appearance/appearance-main.c
+++ b/capplets/appearance/appearance-main.c
@@ -138,6 +138,8 @@ main (int argc, char **argv)
{
AppearanceData *data;
GtkWidget *w;
+ GtkWidget *nb;
+ GtkWidget *nb_custom_theme;
GtkStyleContext *context;
gchar *install_filename = NULL;
@@ -204,9 +206,9 @@ main (int argc, char **argv)
if (wallpaper_files && !install_filename && !start_page)
start_page = g_strdup ("background");
- GtkNotebook* nb = GTK_NOTEBOOK(appearance_capplet_get_widget (data, "main_notebook"));
- gtk_widget_add_events (GTK_WIDGET (nb), GDK_SCROLL_MASK);
- g_signal_connect (GTK_WIDGET (nb), "scroll-event",
+ nb = appearance_capplet_get_widget (data, "main_notebook");
+ gtk_widget_add_events (nb, GDK_SCROLL_MASK);
+ g_signal_connect (nb, "scroll-event",
G_CALLBACK (capplet_dialog_page_scroll_event_cb),
GTK_WINDOW (w));
@@ -219,10 +221,12 @@ main (int argc, char **argv)
w = appearance_capplet_get_widget (data, page_name);
if (w != NULL) {
gint pindex;
+ GtkNotebook *notebook;
- pindex = gtk_notebook_page_num (nb, w);
+ notebook = GTK_NOTEBOOK (nb);
+ pindex = gtk_notebook_page_num (notebook, w);
if (pindex != -1)
- gtk_notebook_set_current_page (nb, pindex);
+ gtk_notebook_set_current_page (notebook, pindex);
}
g_free (page_name);
}
@@ -236,6 +240,12 @@ main (int argc, char **argv)
g_option_context_free (option_context);
+ nb_custom_theme = appearance_capplet_get_widget (data, "notebook2");
+ gtk_widget_add_events (nb_custom_theme, GDK_SCROLL_MASK);
+ g_signal_connect (nb_custom_theme, "scroll-event",
+ G_CALLBACK (capplet_dialog_page_scroll_event_cb),
+ GTK_WINDOW (w));
+
/* start the mainloop */
gtk_main ();