Commit 7c436727 authored by Florian Müllner's avatar Florian Müllner Committed by Julian Sparber
Browse files

background: Simplify background-chosen signal

Now that there's only a single background to set, there's no use for
a flag parameter to specify the background(s).

#864
parent 159c9afe
......@@ -55,8 +55,7 @@ enum
static guint signals [N_SIGNALS];
static void
emit_background_chosen (CcBackgroundChooser *self,
CcBackgroundSelectionFlags flags)
emit_background_chosen (CcBackgroundChooser *self)
{
g_autoptr(GList) list = NULL;
CcBackgroundItem *item;
......@@ -68,7 +67,7 @@ emit_background_chosen (CcBackgroundChooser *self,
item = g_object_get_data (list->data, "item");
g_signal_emit (self, signals[BACKGROUND_CHOSEN], 0, item, flags);
g_signal_emit (self, signals[BACKGROUND_CHOSEN], 0, item);
gtk_flow_box_unselect_all (flowbox);
}
......@@ -184,7 +183,7 @@ on_item_activated_cb (GtkFlowBox *flowbox,
CcBackgroundChooser *self)
{
self->recent_selected = flowbox == self->recent_flowbox;
emit_background_chosen (self, CC_BACKGROUND_SELECTION_DESKTOP);
emit_background_chosen (self);
}
static void
......@@ -277,9 +276,8 @@ cc_background_chooser_class_init (CcBackgroundChooserClass *klass)
G_SIGNAL_RUN_FIRST,
0, NULL, NULL, NULL,
G_TYPE_NONE,
2,
CC_TYPE_BACKGROUND_ITEM,
G_TYPE_INT);
1,
CC_TYPE_BACKGROUND_ITEM);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/background/cc-background-chooser.ui");
......
......@@ -24,13 +24,6 @@
G_BEGIN_DECLS
typedef enum
{
CC_BACKGROUND_SELECTION_NONE = 0,
CC_BACKGROUND_SELECTION_DESKTOP = 1 << 0,
CC_BACKGROUND_SELECTION_LOCK_SCREEN = 1 << 1,
} CcBackgroundSelectionFlags;
#define CC_TYPE_BACKGROUND_CHOOSER (cc_background_chooser_get_type())
G_DECLARE_FINAL_TYPE (CcBackgroundChooser, cc_background_chooser, CC, BACKGROUND_CHOOSER, GtkBox)
......
......@@ -229,7 +229,6 @@ set_background (CcBackgroundPanel *panel,
static void
on_chooser_background_chosen_cb (CcBackgroundChooser *chooser,
CcBackgroundItem *item,
CcBackgroundSelectionFlags flags,
CcBackgroundPanel *self)
{
set_background (self, self->settings, item);
......
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