From 6e1d5d1bf7e4c1bbac9d1d76fe967acf0dc423d1 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 2 May 2007 06:30:23 +0000 Subject: [PATCH 1/1] [darcs-to-svn @ Fixing presence and preference dialog] svn path=/trunk/; revision=22 --- libempathy-gtk/Makefile.am | 2 + libempathy-gtk/empathy-main-window.c | 2 +- libempathy-gtk/gossip-preferences.c | 9 +- libempathy-gtk/gossip-preferences.glade | 995 +++++++++++++++++++ libempathy-gtk/gossip-preferences.h | 4 +- libempathy-gtk/gossip-presence-chooser.c | 2 +- libempathy-gtk/gossip-presence-chooser.glade | 173 ++++ 7 files changed, 1181 insertions(+), 6 deletions(-) create mode 100644 libempathy-gtk/gossip-preferences.glade create mode 100644 libempathy-gtk/gossip-presence-chooser.glade diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am index 58582bfd..f6ed2fb3 100644 --- a/libempathy-gtk/Makefile.am +++ b/libempathy-gtk/Makefile.am @@ -41,6 +41,8 @@ libempathy_gtk_includedir = $(includedir)/empathy/ gladedir = $(datadir)/empathy glade_DATA = \ empathy-main-window.glade \ + gossip-preferences.glade \ + gossip-presence-chooser.glade \ gossip-accounts-dialog.glade \ gossip-account-widget-jabber.glade \ gossip-chat.glade diff --git a/libempathy-gtk/empathy-main-window.c b/libempathy-gtk/empathy-main-window.c index f3d3a3ad..ca4577f2 100644 --- a/libempathy-gtk/empathy-main-window.c +++ b/libempathy-gtk/empathy-main-window.c @@ -531,7 +531,7 @@ static void main_window_edit_preferences_cb (GtkWidget *widget, EmpathyMainWindow *window) { - //gossip_preferences_show (); + gossip_preferences_show (); } static void diff --git a/libempathy-gtk/gossip-preferences.c b/libempathy-gtk/gossip-preferences.c index 2f127a51..2179a7ef 100644 --- a/libempathy-gtk/gossip-preferences.c +++ b/libempathy-gtk/gossip-preferences.c @@ -823,7 +823,7 @@ preferences_destroy_cb (GtkWidget *widget, g_free (preferences); } -void +GtkWidget * gossip_preferences_show (void) { static GossipPreferences *preferences; @@ -831,13 +831,13 @@ gossip_preferences_show (void) if (preferences) { gtk_window_present (GTK_WINDOW (preferences->dialog)); - return; + return preferences->dialog; } preferences = g_new0 (GossipPreferences, 1); glade = gossip_glade_get_file ( - "main.glade", + "gossip-preferences.glade", "preferences_dialog", NULL, "preferences_dialog", &preferences->dialog, @@ -882,4 +882,7 @@ gossip_preferences_show (void) } gtk_widget_show (preferences->dialog); + + return preferences->dialog; } + diff --git a/libempathy-gtk/gossip-preferences.glade b/libempathy-gtk/gossip-preferences.glade new file mode 100644 index 00000000..41ee4fe7 --- /dev/null +++ b/libempathy-gtk/gossip-preferences.glade @@ -0,0 +1,995 @@ + + + + + + + + 5 + Preferences + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + False + True + False + gtk-preferences + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + False + + + + True + False + 2 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-close + True + GTK_RELIEF_NORMAL + True + -6 + + + + + 0 + False + True + GTK_PACK_END + + + + + + 5 + True + True + True + True + GTK_POS_TOP + False + False + + + + 12 + True + False + 18 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 6 + 0 + 12 + 0 + + + + True + False + 6 + + + + True + Avatars are user chosen images shown in the contact list + True + Show _avatars + True + GTK_RELIEF_NORMAL + True + True + False + True + + + 0 + False + False + + + + + + True + True + Show co_mpact contact list + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Show _smileys as images + True + GTK_RELIEF_NORMAL + True + True + False + True + + + 0 + False + False + + + + + + + + + + True + <b>Appearance</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + False + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 6 + 0 + 12 + 0 + + + + True + True + _Open new chats in separate windows + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + + + + + True + <b>Behaviour</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + False + + + + + False + True + + + + + + True + General + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + 12 + True + False + 18 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 6 + 0 + 12 + 0 + + + + True + False + 6 + + + + True + True + _Play sound when messages arrive + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Enable sounds when _busy + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + True + True + Enable sounds when _away + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + + + + + + True + <b>Audio</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + False + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 6 + 0 + 12 + 0 + + + + True + True + Display notifications when contacts come _online + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + + + + + True + <b>Visual</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + False + + + + + False + True + + + + + + True + Notifications + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + 12 + False + 18 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 6 + 0 + 12 + 0 + + + + True + False + 6 + + + + True + False + 0 + + + + True + False + 6 + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + False + False + False + True + False + False + False + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + + True + False + 6 + + + + True + gtk-dialog-info + 4 + 0.5 + 0 + 0 + 0 + + + 0 + False + True + + + + + + True + <small>The list of languages reflects only the languages for which you have a dictionary installed.</small> + False + True + GTK_JUSTIFY_LEFT + True + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + True + True + + + + + 0 + False + True + + + + + + + + + + True + <b>Languages</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + True + True + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 6 + 0 + 12 + 0 + + + + True + True + _Enable spell checking + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + + + + + True + <b>Options</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + True + + + + + False + True + + + + + + True + Spell Checking + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + 12 + True + False + 18 + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 6 + 0 + 12 + 0 + + + + True + False + 6 + + + + True + False + 12 + + + + True + Chat Th_eme: + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + combobox_chat_theme + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + + False + True + + + 0 + False + False + + + + + 0 + True + True + + + + + + + + + + True + <b>Appearance</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + False + + + + + + True + 0 + 0.5 + GTK_SHADOW_NONE + + + + True + 0.5 + 0.5 + 1 + 1 + 6 + 0 + 12 + 0 + + + + True + True + _Use for chat rooms + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + + + + + True + <b>Options</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + label_item + + + + + 0 + False + False + + + + + False + True + + + + + + True + Themes + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + True + True + + + + + + + diff --git a/libempathy-gtk/gossip-preferences.h b/libempathy-gtk/gossip-preferences.h index 428d0fc7..3d635cb6 100644 --- a/libempathy-gtk/gossip-preferences.h +++ b/libempathy-gtk/gossip-preferences.h @@ -25,6 +25,8 @@ #ifndef __GOSSIP_PREFERENCES_H__ #define __GOSSIP_PREFERENCES_H__ +#include + G_BEGIN_DECLS #define GOSSIP_PREFS_PATH "/apps/empathy" @@ -46,7 +48,7 @@ G_BEGIN_DECLS #define GOSSIP_PREFS_CONTACTS_SHOW_OFFLINE GOSSIP_PREFS_PATH "/contacts/show_offline" #define GOSSIP_PREFS_HINTS_CLOSE_MAIN_WINDOW GOSSIP_PREFS_PATH "/hints/close_main_window" -void gossip_preferences_show (void); +GtkWidget * gossip_preferences_show (void); G_END_DECLS diff --git a/libempathy-gtk/gossip-presence-chooser.c b/libempathy-gtk/gossip-presence-chooser.c index 2068b7a0..3a2806a8 100644 --- a/libempathy-gtk/gossip-presence-chooser.c +++ b/libempathy-gtk/gossip-presence-chooser.c @@ -329,7 +329,7 @@ presence_chooser_show_dialog (GossipPresenceChooser *chooser, dialog = NULL; } - glade = gossip_glade_get_file ("main.glade", + glade = gossip_glade_get_file ("gossip-presence-chooser.glade", "status_message_dialog", NULL, "status_message_dialog", &dialog, diff --git a/libempathy-gtk/gossip-presence-chooser.glade b/libempathy-gtk/gossip-presence-chooser.glade new file mode 100644 index 00000000..f9f1d4eb --- /dev/null +++ b/libempathy-gtk/gossip-presence-chooser.glade @@ -0,0 +1,173 @@ + + + + + + + + 5 + Status Message Presets + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + False + False + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + False + + + + True + False + 2 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + 0 + False + True + GTK_PACK_END + + + + + + 5 + True + False + 6 + + + + True + False + 6 + + + + True + 0.5 + 0.5 + 0 + 0 + + + 0 + False + True + + + + + + True + Enter status message: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + True + True + + + + + 0 + False + False + + + + + + True + False + True + True + + + 0 + False + False + + + + + + True + True + _Add to status message list + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + + + + 0 + True + True + + + + + + + -- 2.39.2