summaryrefslogtreecommitdiff
path: root/src/trg-preferences-dialog.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-02-07 23:13:05 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-02-07 23:13:05 +0000
commit14f2c776d58f8aba8f810d7193fba01bc658d77e (patch)
treebc6188dff939d246c60dc7f5a9f119f25699e2c7 /src/trg-preferences-dialog.c
parentbda3a28d5b6be86b93e8e22fd024f085342905cb (diff)
presence of status icon configurable, and minimise to tray. update tooltip using a text-pushed event instead of inside statusbar. put geoip in trg-peers-model priv.
Diffstat (limited to 'src/trg-preferences-dialog.c')
-rw-r--r--src/trg-preferences-dialog.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/trg-preferences-dialog.c b/src/trg-preferences-dialog.c
index cd8f51f..8a88205 100644
--- a/src/trg-preferences-dialog.c
+++ b/src/trg-preferences-dialog.c
@@ -28,6 +28,7 @@
#include "hig.h"
#include "trg-preferences-dialog.h"
+#include "trg-json-widgets.h"
#include "trg-preferences.h"
#define TRG_PREFERENCES_DIALOG_GET_PRIVATE(object) \
@@ -193,6 +194,29 @@ static GtkWidget *new_entry(GConfClient * gconf, const char *key)
return w;
}
+static GtkWidget *trg_prefs_desktopPage(GConfClient *gconf)
+{
+ GtkWidget *tray, *tray_min, *t;
+ gint row = 0;
+
+ t = hig_workarea_create();
+
+ hig_workarea_add_section_title(t, &row, "System Tray");
+
+ tray = new_check_button(gconf, "Show in system tray",
+ TRG_GCONF_KEY_SYSTEM_TRAY);
+ hig_workarea_add_wide_control(t, &row, tray);
+
+ tray_min = new_check_button(gconf, "Minimise to system tray",
+ TRG_GCONF_KEY_SYSTEM_TRAY_MINIMISE);
+ gtk_widget_set_sensitive(tray_min, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(tray)));
+ g_signal_connect(G_OBJECT(tray), "toggled",
+ G_CALLBACK(toggle_active_arg_is_sensitive), tray_min);
+ hig_workarea_add_wide_control(t, &row, tray_min);
+
+ return t;
+}
+
static GtkWidget *trg_prefs_serverPage(GConfClient * gconf)
{
GtkWidget *w, *t;
@@ -259,6 +283,10 @@ static GObject *trg_preferences_dialog_constructor(GType type,
trg_prefs_serverPage(priv->gconf),
gtk_label_new("Connection"));
+ gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
+ trg_prefs_desktopPage(priv->gconf),
+ gtk_label_new("Desktop"));
+
gtk_container_set_border_width(GTK_CONTAINER(notebook), GUI_PAD);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(object)->vbox), notebook,