[gnome-system-monitor] Use gsettings binding to set the active preferences tab
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Use gsettings binding to set the active preferences tab
- Date: Tue, 23 Jul 2013 19:11:07 +0000 (UTC)
commit bf6c60e06d573ed0d769fb851e78fd40fef0b743
Author: Robert Roth <robert roth off gmail com>
Date: Tue Jul 23 22:10:14 2013 +0300
Use gsettings binding to set the active preferences tab
src/procdialogs.cpp | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp
index b5548eb..c752947 100644
--- a/src/procdialogs.cpp
+++ b/src/procdialogs.cpp
@@ -468,18 +468,8 @@ procdialog_create_preferences_dialog (ProcmanApp *app)
g_signal_connect (G_OBJECT (prefs_dialog), "response",
G_CALLBACK (prefs_dialog_button_pressed), app);
- switch (g_settings_get_int (app->settings, "current-tab")) {
- case PROCMAN_TAB_PROCESSES:
- gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 0);
- break;
- case PROCMAN_TAB_RESOURCES:
- gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 1);
- break;
- case PROCMAN_TAB_DISKS:
- gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 2);
- break;
+ g_settings_bind(app->settings, "current-tab", notebook, "page", G_SETTINGS_BIND_GET_NO_CHANGES);
- }
gtk_builder_connect_signals (builder, NULL);
g_object_unref (G_OBJECT (builder));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]