Index: plugins/pager/pager.c =================================================================== --- plugins/pager/pager.c (revision 22196) +++ plugins/pager/pager.c (working copy) @@ -40,6 +40,7 @@ int screen_changed_id; int rows; + gboolean scrolling; GtkWidget *pager; } @@ -119,6 +120,7 @@ char *file; XfceRc *rc; int rows = 1; + gboolean scrolling = TRUE; if ((file = xfce_panel_plugin_lookup_rc_file (plugin)) != NULL) { @@ -128,10 +130,12 @@ if (rc != NULL) { rows = xfce_rc_read_int_entry (rc, "rows", 1); + scrolling = xfce_rc_read_bool_entry (rc, "scrolling", TRUE); } } pager->rows = rows; + pager->scrolling = scrolling; } static void @@ -150,6 +154,8 @@ return; xfce_rc_write_int_entry (rc, "rows", pager->rows); + + xfce_rc_write_bool_entry (rc, "scrolling", pager->scrolling); xfce_rc_close (rc); } @@ -229,6 +235,7 @@ netk_pager_set_orientation (NETK_PAGER (pager->pager), xfce_panel_plugin_get_orientation (plugin)); netk_pager_set_n_rows (NETK_PAGER (pager->pager), pager->rows); + netk_pager_set_workspace_scrolling (NETK_PAGER (pager->pager), pager->scrolling); gtk_widget_show (pager->pager); gtk_container_add (GTK_CONTAINER (plugin), pager->pager); @@ -265,6 +272,19 @@ } static void +workspace_scrolling_toggled (GtkWidget *button, Pager *pager) +{ + gboolean scrolling = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); + + if (pager->scrolling != scrolling) + { + pager->scrolling = scrolling; + + netk_pager_set_workspace_scrolling (NETK_PAGER (pager->pager), scrolling); + } +} + +static void pager_dialog_response (GtkWidget *dlg, int reponse, Pager *pager) { g_object_set_data (G_OBJECT (pager->plugin), "dialog", NULL); @@ -277,7 +297,7 @@ static void pager_properties_dialog (XfcePanelPlugin *plugin, Pager *pager) { - GtkWidget *dlg, *vbox, *hbox, *label, *spin; + GtkWidget *dlg, *vbox, *hbox, *label, *spin, *scrolling; int max; xfce_panel_plugin_block_menu (plugin); @@ -340,6 +360,14 @@ gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); } + + scrolling = gtk_check_button_new_with_mnemonic (_("Switch workspaces using the mouse wheel")); + gtk_widget_show (scrolling); + gtk_box_pack_start (GTK_BOX (vbox), scrolling, FALSE, FALSE, 0); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (scrolling), pager->scrolling); + + g_signal_connect (scrolling, "toggled", + G_CALLBACK (workspace_scrolling_toggled), pager); gtk_widget_show (dlg); }