diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2007-05-03 01:39:27 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-05-03 01:39:27 +0800 |
commit | 563cdc5a284bc85957f60b14048ba6e42a0c7c87 (patch) | |
tree | bb0b4df3fa7e332602951d48c46384a9b3cb7ab3 /libempathy-gtk | |
parent | 02fc345b94f6fa5d4a87ec2917e5fe846f9e755d (diff) | |
download | gsoc2013-empathy-563cdc5a284bc85957f60b14048ba6e42a0c7c87.tar gsoc2013-empathy-563cdc5a284bc85957f60b14048ba6e42a0c7c87.tar.gz gsoc2013-empathy-563cdc5a284bc85957f60b14048ba6e42a0c7c87.tar.bz2 gsoc2013-empathy-563cdc5a284bc85957f60b14048ba6e42a0c7c87.tar.lz gsoc2013-empathy-563cdc5a284bc85957f60b14048ba6e42a0c7c87.tar.xz gsoc2013-empathy-563cdc5a284bc85957f60b14048ba6e42a0c7c87.tar.zst gsoc2013-empathy-563cdc5a284bc85957f60b14048ba6e42a0c7c87.zip |
[darcs-to-svn @ Autostart]
svn path=/trunk/; revision=27
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-main-window.c | 33 | ||||
-rw-r--r-- | libempathy-gtk/empathy-main-window.glade | 85 | ||||
-rw-r--r-- | libempathy-gtk/gossip-presence-chooser.c | 21 | ||||
-rw-r--r-- | libempathy-gtk/gossip-status-presets.c | 25 | ||||
-rw-r--r-- | libempathy-gtk/gossip-status-presets.dtd | 6 |
5 files changed, 34 insertions, 136 deletions
diff --git a/libempathy-gtk/empathy-main-window.c b/libempathy-gtk/empathy-main-window.c index f293f55c3..563129dc4 100644 --- a/libempathy-gtk/empathy-main-window.c +++ b/libempathy-gtk/empathy-main-window.c @@ -70,9 +70,6 @@ typedef struct { GtkTooltips *tooltips; /* Menu widgets */ - GtkWidget *chat_connect; - GtkWidget *chat_disconnect; - GtkWidget *chat_search; GtkWidget *room; GtkWidget *room_menu; GtkWidget *room_sep; @@ -100,12 +97,6 @@ static void main_window_destroy_cb (GtkWidget static void main_window_favorite_chatroom_menu_setup (void); static void main_window_chat_quit_cb (GtkWidget *widget, EmpathyMainWindow *window); -static void main_window_chat_connect_cb (GtkWidget *widget, - EmpathyMainWindow *window); -static void main_window_chat_disconnect_cb (GtkWidget *widget, - EmpathyMainWindow *window); -static void main_window_chat_search_cb (GtkWidget *widget, - EmpathyMainWindow *window); static void main_window_chat_new_message_cb (GtkWidget *widget, EmpathyMainWindow *window); static void main_window_chat_history_cb (GtkWidget *widget, @@ -192,9 +183,6 @@ empathy_main_window_show (void) NULL, "main_window", &window->window, "main_vbox", &window->main_vbox, - "chat_connect", &window->chat_connect, - "chat_disconnect", &window->chat_disconnect, - "chat_search", &window->chat_search, "chat_show_offline", &show_offline_widget, "room", &window->room, "room_sep", &window->room_sep, @@ -210,9 +198,6 @@ empathy_main_window_show (void) "main_window", "destroy", main_window_destroy_cb, "main_window", "configure_event", main_window_configure_event_cb, "chat_quit", "activate", main_window_chat_quit_cb, - "chat_connect", "activate", main_window_chat_connect_cb, - "chat_disconnect", "activate", main_window_chat_disconnect_cb, - "chat_search", "activate", main_window_chat_search_cb, "chat_new_message", "activate", main_window_chat_new_message_cb, "chat_history", "activate", main_window_chat_history_cb, "room_join_new", "activate", main_window_room_join_new_cb, @@ -394,24 +379,6 @@ main_window_chat_quit_cb (GtkWidget *widget, } static void -main_window_chat_connect_cb (GtkWidget *widget, - EmpathyMainWindow *window) -{ -} - -static void -main_window_chat_disconnect_cb (GtkWidget *widget, - EmpathyMainWindow *window) -{ -} - -static void -main_window_chat_search_cb (GtkWidget *widget, - EmpathyMainWindow *window) -{ -} - -static void main_window_chat_new_message_cb (GtkWidget *widget, EmpathyMainWindow *window) { diff --git a/libempathy-gtk/empathy-main-window.glade b/libempathy-gtk/empathy-main-window.glade index 3dacc2005..f2ed665d8 100644 --- a/libempathy-gtk/empathy-main-window.glade +++ b/libempathy-gtk/empathy-main-window.glade @@ -42,52 +42,6 @@ <widget class="GtkMenu" id="chat_menu"> <child> - <widget class="GtkImageMenuItem" id="chat_connect"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Connect</property> - <property name="use_underline">True</property> - - <child internal-child="image"> - <widget class="GtkImage" id="image874"> - <property name="visible">True</property> - <property name="stock">gtk-connect</property> - <property name="icon_size">1</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkImageMenuItem" id="chat_disconnect"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Disconnect</property> - <property name="use_underline">True</property> - - <child internal-child="image"> - <widget class="GtkImage" id="image875"> - <property name="visible">True</property> - <property name="stock">gtk-disconnect</property> - <property name="icon_size">1</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkSeparatorMenuItem" id="separator1"> - <property name="visible">True</property> - </widget> - </child> - - <child> <widget class="GtkImageMenuItem" id="chat_new_message"> <property name="visible">True</property> <property name="label" translatable="yes">_New Message...</property> @@ -95,7 +49,7 @@ <accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image876"> + <widget class="GtkImage" id="image885"> <property name="visible">True</property> <property name="pixbuf">gossip-message.png</property> <property name="xalign">0.5</property> @@ -115,7 +69,7 @@ <accelerator key="F3" modifiers="0" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image877"> + <widget class="GtkImage" id="image886"> <property name="visible">True</property> <property name="stock">gtk-justify-left</property> <property name="icon_size">1</property> @@ -141,7 +95,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image878"> + <widget class="GtkImage" id="image887"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -155,27 +109,6 @@ </child> <child> - <widget class="GtkImageMenuItem" id="chat_search"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Search</property> - <property name="use_underline">True</property> - <accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/> - - <child internal-child="image"> - <widget class="GtkImage" id="image879"> - <property name="visible">True</property> - <property name="stock">gtk-find</property> - <property name="icon_size">1</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - - <child> <widget class="GtkSeparatorMenuItem" id="separator3"> <property name="visible">True</property> </widget> @@ -205,7 +138,7 @@ <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image880"> + <widget class="GtkImage" id="image888"> <property name="visible">True</property> <property name="stock">gtk-quit</property> <property name="icon_size">1</property> @@ -238,7 +171,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image881"> + <widget class="GtkImage" id="image889"> <property name="visible">True</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -279,7 +212,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image882"> + <widget class="GtkImage" id="image890"> <property name="visible">True</property> <property name="pixbuf">gossip-group-message.png</property> <property name="xalign">0.5</property> @@ -348,7 +281,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image883"> + <widget class="GtkImage" id="image891"> <property name="visible">True</property> <property name="stock">gtk-preferences</property> <property name="icon_size">1</property> @@ -382,7 +315,7 @@ <accelerator key="F1" modifiers="0" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image884"> + <widget class="GtkImage" id="image892"> <property name="visible">True</property> <property name="stock">gtk-help</property> <property name="icon_size">1</property> @@ -402,7 +335,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image885"> + <widget class="GtkImage" id="image893"> <property name="visible">True</property> <property name="stock">gtk-about</property> <property name="icon_size">1</property> diff --git a/libempathy-gtk/gossip-presence-chooser.c b/libempathy-gtk/gossip-presence-chooser.c index 16b411f31..e540c8a4e 100644 --- a/libempathy-gtk/gossip-presence-chooser.c +++ b/libempathy-gtk/gossip-presence-chooser.c @@ -830,15 +830,16 @@ gossip_presence_chooser_new (void) GtkWidget * gossip_presence_chooser_create_menu (GossipPresenceChooser *chooser) { + const gchar *status; GtkWidget *menu; GtkWidget *item; + GtkWidget *image; guint i; menu = gtk_menu_new (); for (i = 0; i < G_N_ELEMENTS (states); i++) { GList *list, *l; - const gchar *status; status = gossip_presence_state_get_default_status (states[i]); presence_chooser_menu_add_item (chooser, @@ -869,8 +870,24 @@ gossip_presence_chooser_create_menu (GossipPresenceChooser *chooser) gtk_widget_show (item); } - item = gtk_menu_item_new_with_label (_("Clear List...")); + /* Offline to disconnect */ + status = gossip_presence_state_get_default_status (MC_PRESENCE_OFFLINE); + presence_chooser_menu_add_item (chooser, + menu, + status, + MC_PRESENCE_OFFLINE, + FALSE); + /* Separator. */ + item = gtk_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + gtk_widget_show (item); + + /* Clear list */ + item = gtk_image_menu_item_new_with_label (_("Clear List...")); + image = gtk_image_new_from_stock (GTK_STOCK_CLEAR, GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + gtk_widget_show (image); gtk_widget_show (item); g_signal_connect (item, diff --git a/libempathy-gtk/gossip-status-presets.c b/libempathy-gtk/gossip-status-presets.c index fce8a08d4..b27238d4f 100644 --- a/libempathy-gtk/gossip-status-presets.c +++ b/libempathy-gtk/gossip-status-presets.c @@ -152,7 +152,7 @@ status_presets_file_parse (const gchar *filename) /* Use the default if not set */ if (!default_preset) { - status_presets_set_default (MC_PRESENCE_AVAILABLE, NULL); + status_presets_set_default (MC_PRESENCE_OFFLINE, NULL); } gossip_debug (DEBUG_DOMAIN, "Parsed %d status presets", g_list_length (presets)); @@ -186,23 +186,6 @@ gossip_status_presets_get_all (void) g_free (file_with_path); } -const gchar * -status_presets_get_state_as_str (McPresence state) -{ - switch (state) { - case MC_PRESENCE_AVAILABLE: - return "available"; - case MC_PRESENCE_DO_NOT_DISTURB: - return "busy"; - case MC_PRESENCE_AWAY: - return "away"; - case MC_PRESENCE_EXTENDED_AWAY: - return "ext_away"; - default: - return "unknown"; - } -} - static gboolean status_presets_file_save (void) { @@ -231,7 +214,7 @@ status_presets_file_save (void) xmlNodePtr subnode; xmlChar *state; - state = (gchar*) status_presets_get_state_as_str (default_preset->state); + state = (gchar*) gossip_presence_state_to_str (default_preset->state); subnode = xmlNewTextChild (root, NULL, "default", default_preset->status); @@ -244,7 +227,7 @@ status_presets_file_save (void) xmlChar *state; sp = l->data; - state = (gchar*) status_presets_get_state_as_str (sp->state); + state = (gchar*) gossip_presence_state_to_str (sp->state); count[sp->state]++; if (count[sp->state] > STATUS_PRESETS_MAX_EACH) { @@ -358,7 +341,7 @@ McPresence gossip_status_presets_get_default_state (void) { if (!default_preset) { - return MC_PRESENCE_AVAILABLE; + return MC_PRESENCE_OFFLINE; } return default_preset->state; diff --git a/libempathy-gtk/gossip-status-presets.dtd b/libempathy-gtk/gossip-status-presets.dtd index 49c797b1f..b7acc9620 100644 --- a/libempathy-gtk/gossip-status-presets.dtd +++ b/libempathy-gtk/gossip-status-presets.dtd @@ -7,10 +7,8 @@ <!ELEMENT presets ((default?),status*)> <!ELEMENT default (#PCDATA)> -<!ATTLIST default - presence (available|busy|away|ext_away) "available"> +<!ATTLIST default presence CDATA #REQUIRED> <!ELEMENT status (#PCDATA)> -<!ATTLIST status - presence (available|busy|away|ext_away) "available"> +<!ATTLIST status presence CDATA #REQUIRED> |