background: Add "add" button
To allow adding arbitrary files to the list.
This commit is contained in:
parent
83056c17dc
commit
575d8d2463
2 changed files with 43 additions and 3 deletions
|
@ -30,7 +30,7 @@
|
|||
<object class="GtkVBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="spacing">0</property>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="sources-combobox">
|
||||
<property name="visible">True</property>
|
||||
|
@ -45,10 +45,11 @@
|
|||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">0</property>
|
||||
<property name="padding">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow2">
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="width_request">220</property>
|
||||
<property name="height_request">380</property>
|
||||
<property name="visible">True</property>
|
||||
|
@ -75,27 +76,57 @@
|
|||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolbar" id="toolbar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_size">1</property>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="add_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="icon_name">list-add-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="heading-hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">24</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="background-label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label">Current background</property>
|
||||
<attributes>
|
||||
|
|
|
@ -757,6 +757,7 @@ cc_background_panel_init (CcBackgroundPanel *self)
|
|||
GError *err = NULL;
|
||||
GtkWidget *widget;
|
||||
GtkListStore *store;
|
||||
GtkStyleContext *context;
|
||||
|
||||
priv = self->priv = BACKGROUND_PANEL_PRIVATE (self);
|
||||
|
||||
|
@ -830,6 +831,14 @@ cc_background_panel_init (CcBackgroundPanel *self)
|
|||
G_CALLBACK (backgrounds_changed_cb),
|
||||
self);
|
||||
|
||||
/* Join treeview and buttons */
|
||||
widget = WID ("scrolledwindow1");
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM);
|
||||
widget = WID ("toolbar1");
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
|
||||
|
||||
/* setup preview area */
|
||||
widget = WID ("preview-area");
|
||||
g_signal_connect (widget, "draw", G_CALLBACK (preview_draw_cb),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue