aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Kaser <f.kaser@gmx.net>2010-08-05 16:19:39 +0800
committerFelix Kaser <f.kaser@gmx.net>2010-08-05 20:41:20 +0800
commitd9db9822240a5aece8ee660bebb2afe7202a7f53 (patch)
tree2298c0166562b8e8a7821927b0eeb53be70b9ba8
parentfe3dade449f6c4ef735166696fe86de968122b94 (diff)
downloadgsoc2013-empathy-d9db9822240a5aece8ee660bebb2afe7202a7f53.tar
gsoc2013-empathy-d9db9822240a5aece8ee660bebb2afe7202a7f53.tar.gz
gsoc2013-empathy-d9db9822240a5aece8ee660bebb2afe7202a7f53.tar.bz2
gsoc2013-empathy-d9db9822240a5aece8ee660bebb2afe7202a7f53.tar.lz
gsoc2013-empathy-d9db9822240a5aece8ee660bebb2afe7202a7f53.tar.xz
gsoc2013-empathy-d9db9822240a5aece8ee660bebb2afe7202a7f53.tar.zst
gsoc2013-empathy-d9db9822240a5aece8ee660bebb2afe7202a7f53.zip
added structure to show text when list empty
I've added a notebook which holds the treeview and on another page it holds a label. The logic when to switch has to be implemented.
-rw-r--r--src/empathy-main-window.c9
-rw-r--r--src/empathy-main-window.ui31
2 files changed, 35 insertions, 5 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 826cda487..b82c077f8 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -115,6 +115,8 @@ struct _EmpathyMainWindowPriv {
GtkWidget *presence_chooser;
GtkWidget *errors_vbox;
GtkWidget *search_bar;
+ GtkWidget *notebook;
+ GtkWidget *no_entry_label;
GtkToggleAction *show_protocols;
GtkRadioAction *sort_by_name;
@@ -1511,6 +1513,8 @@ empathy_main_window_init (EmpathyMainWindow *window)
"view_show_map", &show_map_widget,
"room_join_favorites", &priv->room_join_favorites,
"presence_toolbar", &priv->presence_toolbar,
+ "notebook", &priv->notebook,
+ "no_entry_label", &priv->no_entry_label,
"roster_scrolledwindow", &sw,
NULL);
g_free (filename);
@@ -1645,6 +1649,11 @@ empathy_main_window_init (EmpathyMainWindow *window)
g_signal_connect_swapped (window, "map",
G_CALLBACK (gtk_widget_grab_focus), priv->individual_view);
+ /* TODO: Set up the TreeView Notebook */
+ // have to detect when the contact list is empty (gtk_tree_model_get_iter_first)
+ //if we are searching display: no match found, otherwise: your contact list is empty
+ //hook to row-added and row removed? fire own signals when empty, not empty?
+
/* Load user-defined accelerators. */
main_window_accels_load ();
diff --git a/src/empathy-main-window.ui b/src/empathy-main-window.ui
index cd0ff296c..97ab02b9e 100644
--- a/src/empathy-main-window.ui
+++ b/src/empathy-main-window.ui
@@ -302,14 +302,35 @@
</packing>
</child>
<child>
- <object class="GtkScrolledWindow" id="roster_scrolledwindow">
+ <object class="GtkNotebook" id="notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
<child>
- <placeholder/>
+ <object class="GtkScrolledWindow" id="roster_scrolledwindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="no_entry_label">
+ <property name="visible">True</property>
+ <property name="yalign">0.30000001192092896</property>
+ <property name="label" translatable="yes">label</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>