diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-09-07 12:02:27 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-09-07 12:02:27 +0800 |
commit | 52d683e48cf1103a9806da95c72abce2db3ae1f4 (patch) | |
tree | b6cee16af70a03666a2d7add2e5bff5c6ed8035c /shell/e-shell-sidebar.c | |
parent | eca687589d106ff87cd4fca7bf581cb0532caf96 (diff) | |
download | gsoc2013-evolution-52d683e48cf1103a9806da95c72abce2db3ae1f4.tar.gz gsoc2013-evolution-52d683e48cf1103a9806da95c72abce2db3ae1f4.tar.zst gsoc2013-evolution-52d683e48cf1103a9806da95c72abce2db3ae1f4.zip |
Progress update:
- Contacts module mostly working now.
- View and search UI not yet working.
- Still refining shell design.
svn path=/branches/kill-bonobo/; revision=36268
Diffstat (limited to 'shell/e-shell-sidebar.c')
-rw-r--r-- | shell/e-shell-sidebar.c | 46 |
1 files changed, 14 insertions, 32 deletions
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c index 30917fd25c..32b31a83c9 100644 --- a/shell/e-shell-sidebar.c +++ b/shell/e-shell-sidebar.c @@ -29,7 +29,6 @@ struct _EShellSidebarPrivate { GtkWidget *image; GtkWidget *primary_label; GtkWidget *secondary_label; - GtkSizeGroup *size_group; gchar *primary_text; gchar *secondary_text; }; @@ -45,9 +44,9 @@ static gpointer parent_class; static void shell_sidebar_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec) + guint property_id, + const GValue *value, + GParamSpec *pspec) { switch (property_id) { case PROP_ICON_NAME: @@ -74,9 +73,9 @@ shell_sidebar_set_property (GObject *object, static void shell_sidebar_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec) + guint property_id, + GValue *value, + GParamSpec *pspec) { switch (property_id) { case PROP_ICON_NAME: @@ -108,11 +107,6 @@ shell_sidebar_dispose (GObject *object) priv = E_SHELL_SIDEBAR_GET_PRIVATE (object); - if (priv->size_group != NULL) { - g_object_unref (priv->size_group); - priv->size_group = NULL; - } - if (priv->event_box != NULL) { g_object_unref (priv->event_box); priv->event_box = NULL; @@ -175,7 +169,7 @@ shell_sidebar_size_request (GtkWidget *widget, static void shell_sidebar_size_allocate (GtkWidget *widget, - GtkAllocation *allocation) + GtkAllocation *allocation) { EShellSidebarPrivate *priv; GtkAllocation child_allocation; @@ -197,7 +191,8 @@ shell_sidebar_size_allocate (GtkWidget *widget, gtk_widget_size_allocate (child, &child_allocation); child_allocation.y += child_requisition.height; - child_allocation.height = allocation->height - child_allocation.y; + child_allocation.height = + allocation->height - child_requisition.height; child = gtk_bin_get_child (GTK_BIN (widget)); if (child != NULL) @@ -206,7 +201,7 @@ shell_sidebar_size_allocate (GtkWidget *widget, static void shell_sidebar_remove (GtkContainer *container, - GtkWidget *widget) + GtkWidget *widget) { EShellSidebarPrivate *priv; @@ -226,9 +221,9 @@ shell_sidebar_remove (GtkContainer *container, static void shell_sidebar_forall (GtkContainer *container, - gboolean include_internals, - GtkCallback callback, - gpointer callback_data) + gboolean include_internals, + GtkCallback callback, + gpointer callback_data) { EShellSidebarPrivate *priv; @@ -306,7 +301,6 @@ shell_sidebar_init (EShellSidebar *shell_sidebar) GtkStyle *style; GtkWidget *container; GtkWidget *widget; - GtkSizeGroup *size_group; const GdkColor *color; shell_sidebar->priv = E_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); @@ -349,10 +343,6 @@ shell_sidebar_init (EShellSidebar *shell_sidebar) gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); shell_sidebar->priv->secondary_label = g_object_ref (widget); gtk_widget_show (widget); - - size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL); - gtk_size_group_add_widget (size_group, shell_sidebar->priv->event_box); - shell_sidebar->priv->size_group = size_group; } GType @@ -461,7 +451,7 @@ e_shell_sidebar_get_secondary_text (EShellSidebar *shell_sidebar) void e_shell_sidebar_set_secondary_text (EShellSidebar *shell_sidebar, - const gchar *secondary_text) + const gchar *secondary_text) { GtkLabel *label; gchar *markup; @@ -482,11 +472,3 @@ e_shell_sidebar_set_secondary_text (EShellSidebar *shell_sidebar, gtk_widget_queue_resize (GTK_WIDGET (shell_sidebar)); g_object_notify (G_OBJECT (shell_sidebar), "secondary-text"); } - -GtkSizeGroup * -e_shell_sidebar_get_size_group (EShellSidebar *shell_sidebar) -{ - g_return_val_if_fail (E_IS_SHELL_SIDEBAR (shell_sidebar), NULL); - - return shell_sidebar->priv->size_group; -} |