aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-23 17:19:14 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-03 19:57:51 +0800
commit808aab1091606abf34fbb67b62026bd442c4c872 (patch)
tree27624c114432a4c9f0a5c3b3812447e499579898 /src
parentc1adae17180cc2b1a0215fadbbfe22c701379e94 (diff)
downloadgsoc2013-empathy-808aab1091606abf34fbb67b62026bd442c4c872.tar
gsoc2013-empathy-808aab1091606abf34fbb67b62026bd442c4c872.tar.gz
gsoc2013-empathy-808aab1091606abf34fbb67b62026bd442c4c872.tar.bz2
gsoc2013-empathy-808aab1091606abf34fbb67b62026bd442c4c872.tar.lz
gsoc2013-empathy-808aab1091606abf34fbb67b62026bd442c4c872.tar.xz
gsoc2013-empathy-808aab1091606abf34fbb67b62026bd442c4c872.tar.zst
gsoc2013-empathy-808aab1091606abf34fbb67b62026bd442c4c872.zip
add generic contact icon and account settings button to the message page
https://bugzilla.gnome.org/show_bug.cgi?id=656097
Diffstat (limited to 'src')
-rw-r--r--src/empathy-roster-window.c21
-rw-r--r--src/empathy-roster-window.ui56
2 files changed, 73 insertions, 4 deletions
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index 8f5bcf2fc..a1e120919 100644
--- a/src/empathy-roster-window.c
+++ b/src/empathy-roster-window.c
@@ -129,6 +129,7 @@ struct _EmpathyRosterWindowPriv {
GtkWidget *search_bar;
GtkWidget *notebook;
GtkWidget *no_entry_label;
+ GtkWidget *button_account_settings;
GtkToggleAction *show_protocols;
GtkRadioAction *sort_by_name;
@@ -608,8 +609,17 @@ OUT:
}
static void
+button_account_settings_clicked_cb (GtkButton *button,
+ EmpathyRosterWindow *self)
+{
+ empathy_accounts_dialog_show_application (gdk_screen_get_default (),
+ NULL, FALSE, FALSE);
+}
+
+static void
display_page_message (EmpathyRosterWindow *self,
- const gchar *msg)
+ const gchar *msg,
+ gboolean display_accounts_button)
{
gchar *tmp;
@@ -620,6 +630,9 @@ display_page_message (EmpathyRosterWindow *self,
gtk_label_set_line_wrap (GTK_LABEL (self->priv->no_entry_label), TRUE);
+ gtk_widget_set_visible (self->priv->button_account_settings,
+ display_accounts_button);
+
gtk_notebook_set_current_page (GTK_NOTEBOOK (self->priv->notebook),
PAGE_MESSAGE);
}
@@ -637,7 +650,7 @@ roster_window_row_deleted_cb (GtkTreeModel *model,
if (empathy_individual_view_is_searching (self->priv->individual_view))
{
- display_page_message (self, _("No match found"));
+ display_page_message (self, _("No match found"), FALSE);
}
}
}
@@ -2317,6 +2330,7 @@ empathy_roster_window_init (EmpathyRosterWindow *self)
"notebook", &self->priv->notebook,
"no_entry_label", &self->priv->no_entry_label,
"roster_scrolledwindow", &sw,
+ "button_account_settings", &self->priv->button_account_settings,
NULL);
g_free (filename);
@@ -2568,6 +2582,9 @@ empathy_roster_window_init (EmpathyRosterWindow *self)
roster_window_notify_contact_list_size_cb (self->priv->gsettings_ui,
EMPATHY_PREFS_UI_SHOW_AVATARS, self);
+
+ g_signal_connect (self->priv->button_account_settings, "clicked",
+ G_CALLBACK (button_account_settings_clicked_cb), self);
}
GtkWidget *
diff --git a/src/empathy-roster-window.ui b/src/empathy-roster-window.ui
index a09d123f8..87c3354a9 100644
--- a/src/empathy-roster-window.ui
+++ b/src/empathy-roster-window.ui
@@ -91,10 +91,62 @@
</object>
</child>
<child>
- <object class="GtkLabel" id="no_entry_label">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="yalign">0.30000001192092896</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="yalign">1</property>
+ <property name="ypad">1</property>
+ <property name="icon_name">avatar-default</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="no_entry_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="yalign">0.30000001192092896</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="yalign">0</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkButton" id="button_account_settings">
+ <property name="label" translatable="yes">Account settings</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">6</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="position">1</property>