Commit b08f2712 authored by Paolo Bacchilega's avatar Paolo Bacchilega

sidebar: no need to specify the name when created

parent 9efe0723
......@@ -4797,7 +4797,7 @@ gth_browser_init (GthBrowser *browser)
/* the file property box */
browser->priv->file_properties = gth_sidebar_new ("file-tools");
browser->priv->file_properties = gth_sidebar_new ();
gtk_widget_set_size_request (browser->priv->file_properties, -1, FILE_PROPERTIES_MINIMUM_HEIGHT);
gtk_widget_hide (browser->priv->file_properties);
gtk_paned_pack2 (GTK_PANED (_gth_browser_get_browser_file_properties_container (browser)),
......
......@@ -134,8 +134,7 @@ _gth_sidebar_add_property_views (GthSidebar *sidebar)
static void
_gth_sidebar_construct (GthSidebar *sidebar,
const char *name)
_gth_sidebar_construct (GthSidebar *sidebar)
{
sidebar->priv->properties = gth_multipage_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (sidebar->priv->properties), GTK_STYLE_CLASS_SIDEBAR);
......@@ -152,7 +151,7 @@ _gth_sidebar_construct (GthSidebar *sidebar,
G_CALLBACK (_gth_sidebar_update_current_child),
sidebar);
sidebar->priv->toolbox = gth_toolbox_new (name);
sidebar->priv->toolbox = gth_toolbox_new ("file-tools");
gtk_style_context_add_class (gtk_widget_get_style_context (sidebar->priv->toolbox), GTK_STYLE_CLASS_SIDEBAR);
gtk_widget_show (sidebar->priv->toolbox);
gtk_stack_add_named (GTK_STACK (sidebar), sidebar->priv->toolbox, GTH_SIDEBAR_PAGE_TOOLS);
......@@ -160,12 +159,12 @@ _gth_sidebar_construct (GthSidebar *sidebar,
GtkWidget *
gth_sidebar_new (const char *name)
gth_sidebar_new (void)
{
GthSidebar *sidebar;
sidebar = g_object_new (GTH_TYPE_SIDEBAR, NULL);
_gth_sidebar_construct (sidebar, name);
_gth_sidebar_construct (sidebar);
_gth_sidebar_add_property_views (sidebar);
return (GtkWidget *) sidebar;
......
......@@ -70,7 +70,7 @@ struct _GthPropertyViewInterface {
};
GType gth_sidebar_get_type (void);
GtkWidget * gth_sidebar_new (const char *name);
GtkWidget * gth_sidebar_new (void);
GtkWidget * gth_sidebar_get_toolbox (GthSidebar *sidebar);
void gth_sidebar_set_file (GthSidebar *sidebar,
GthFileData *file_data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment