Commit 7595228b authored by Marek Kašík's avatar Marek Kašík

printers: Replace toolbar with horizontal box

Due to custom styles, toolbars can look very different
from the rest of panel. This changes toolbar which
contains controls for adding/removing allowed users
to horizontal box.
parent 1ea42cc2
......@@ -1259,8 +1259,8 @@ supply_levels_draw_cb (GtkWidget *widget,
}
static void
allowed_user_remove_cb (GtkToolButton *toolbutton,
gpointer user_data)
allowed_user_remove_cb (GtkButton *button,
gpointer user_data)
{
CcPrintersPanelPrivate *priv;
CcPrintersPanel *self = (CcPrintersPanel*) user_data;
......@@ -1414,13 +1414,14 @@ cc_printers_panel_init (CcPrintersPanel *self)
gtk_builder_get_object (priv->builder, "allowed-user-remove-button");
g_signal_connect (widget, "clicked", G_CALLBACK (allowed_user_remove_cb), self);
/* set plain style for borders of toolbars */
widget = (GtkWidget*)
gtk_builder_get_object (priv->builder, "printers-toolbar");
set_widget_style (widget, "GtkToolbar { border-style: none }");
gtk_builder_get_object (priv->builder, "supply-drawing-area");
g_signal_connect (widget, "draw", G_CALLBACK (supply_levels_draw_cb), self);
/* set plain style for borders of toolbars */
widget = (GtkWidget*)
gtk_builder_get_object (priv->builder, "allowed-users-toolbar");
gtk_builder_get_object (priv->builder, "printers-toolbar");
set_widget_style (widget, "GtkToolbar { border-style: none }");
......@@ -1441,9 +1442,6 @@ cc_printers_panel_init (CcPrintersPanel *self)
gtk_builder_get_object (priv->builder, "clean-print-heads-button");
gtk_widget_set_sensitive (widget, FALSE);
widget = (GtkWidget*)
gtk_builder_get_object (priv->builder, "supply-drawing-area");
g_signal_connect (widget, "draw", G_CALLBACK (supply_levels_draw_cb), self);
populate_printers_list (self);
populate_jobs_list (self);
......
......@@ -97,35 +97,50 @@
</packing>
</child>
<child>
<object class="GtkToolbar" id="allowed-users-toolbar">
<object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
<child>
<object class="GtkToolButton" id="allowed-user-add-button">
<object class="GtkButton" id="allowed-user-add-button">
<property name="visible">True</property>
<property name="label" translatable="yes">toolbutton7</property>
<property name="use_underline">True</property>
<property name="icon_name">list-add</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<child>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="icon_name">list-add</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="allowed-user-remove-button">
<object class="GtkButton" id="allowed-user-remove-button">
<property name="visible">True</property>
<property name="label" translatable="yes">toolbutton8</property>
<property name="use_underline">True</property>
<property name="icon_name">list-remove</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<child>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="icon_name">list-remove</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
......
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