aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-06-04 22:42:14 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-06-04 22:42:14 +0800
commitcaafd5018e041c46c45ca68a4844060345e07ce9 (patch)
treea619c37a063805d7cdf1c43418d9af5701da1229 /src
parent6f31cfb4107da907922d94e75ba575e3b124629f (diff)
downloadgsoc2013-empathy-caafd5018e041c46c45ca68a4844060345e07ce9.tar
gsoc2013-empathy-caafd5018e041c46c45ca68a4844060345e07ce9.tar.gz
gsoc2013-empathy-caafd5018e041c46c45ca68a4844060345e07ce9.tar.bz2
gsoc2013-empathy-caafd5018e041c46c45ca68a4844060345e07ce9.tar.lz
gsoc2013-empathy-caafd5018e041c46c45ca68a4844060345e07ce9.tar.xz
gsoc2013-empathy-caafd5018e041c46c45ca68a4844060345e07ce9.tar.zst
gsoc2013-empathy-caafd5018e041c46c45ca68a4844060345e07ce9.zip
Add a command line option to hide contact list on startup. Fixes bug #535080 (Marco Pesenti Gritti).
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1146 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'src')
-rw-r--r--src/empathy-status-icon.c12
-rw-r--r--src/empathy-status-icon.h3
-rw-r--r--src/empathy.c7
3 files changed, 16 insertions, 6 deletions
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c
index 2ab49a63b..c030a5887 100644
--- a/src/empathy-status-icon.c
+++ b/src/empathy-status-icon.c
@@ -739,7 +739,7 @@ empathy_status_icon_init (EmpathyStatusIcon *icon)
}
EmpathyStatusIcon *
-empathy_status_icon_new (GtkWindow *window)
+empathy_status_icon_new (GtkWindow *window, gboolean hide_contact_list)
{
EmpathyStatusIconPriv *priv;
EmpathyStatusIcon *icon;
@@ -756,9 +756,13 @@ empathy_status_icon_new (GtkWindow *window)
G_CALLBACK (status_icon_delete_event_cb),
icon);
- empathy_conf_get_bool (empathy_conf_get (),
- EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN,
- &should_hide);
+ if (!hide_contact_list) {
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN,
+ &should_hide);
+ } else {
+ should_hide = TRUE;
+ }
if (gtk_window_is_active (priv->window) == should_hide) {
status_icon_set_visibility (icon, !should_hide, FALSE);
diff --git a/src/empathy-status-icon.h b/src/empathy-status-icon.h
index bb33b1c3b..ca21af833 100644
--- a/src/empathy-status-icon.h
+++ b/src/empathy-status-icon.h
@@ -46,7 +46,8 @@ struct _EmpathyStatusIconClass {
};
GType empathy_status_icon_get_type (void) G_GNUC_CONST;
-EmpathyStatusIcon *empathy_status_icon_new (GtkWindow *window);
+EmpathyStatusIcon *empathy_status_icon_new (GtkWindow *window,
+ gboolean hide_contact_list);
G_END_DECLS
diff --git a/src/empathy.c b/src/empathy.c
index d30935d24..5851d41ac 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -358,12 +358,17 @@ main (int argc, char *argv[])
EmpathyIdle *idle;
gboolean autoconnect = TRUE;
gboolean no_connect = FALSE;
+ gboolean hide_contact_list = FALSE;
GError *error = NULL;
GOptionEntry options[] = {
{ "no-connect", 'n',
0, G_OPTION_ARG_NONE, &no_connect,
N_("Don't connect on startup"),
NULL },
+ { "hide-contact-list", 'h',
+ 0, G_OPTION_ARG_NONE, &hide_contact_list,
+ N_("Don't show the contact list on startup"),
+ NULL },
{ NULL }
};
@@ -446,7 +451,7 @@ main (int argc, char *argv[])
/* Setting up UI */
window = empathy_main_window_show ();
- icon = empathy_status_icon_new (GTK_WINDOW (window));
+ icon = empathy_status_icon_new (GTK_WINDOW (window), hide_contact_list);
if (connection) {
/* We se the callback here because we need window */