[gnome-applets/wip/segeiger/windowpicker: 16/17] windowpicker: declare variables at top
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/segeiger/windowpicker: 16/17] windowpicker: declare variables at top
- Date: Sun, 13 Oct 2019 12:55:55 +0000 (UTC)
commit 9ac904dc46233c926d805297b2a1803bb287381d
Author: Sebastian Geiger <sbastig gmx net>
Date: Sun Oct 13 14:54:00 2019 +0200
windowpicker: declare variables at top
windowpicker/src/task-item.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/windowpicker/src/task-item.c b/windowpicker/src/task-item.c
index d244dda24..9590ce478 100644
--- a/windowpicker/src/task-item.c
+++ b/windowpicker/src/task-item.c
@@ -739,14 +739,18 @@ static void on_drag_received_data (
switch (target_type) {
case TARGET_WIDGET_DRAGGED: {
GtkWidget *taskItem;
- GtkWidget *taskList = wp_applet_get_tasks(item->windowPickerApplet);
- gpointer *data = (gpointer *) gtk_selection_data_get_data(selection_data);
+ GtkWidget *taskList;
+ gint target_position;
+ gpointer *data;
+
+ taskList = wp_applet_get_tasks(item->windowPickerApplet);
+ data = (gpointer *) gtk_selection_data_get_data(selection_data);
g_assert(GTK_IS_WIDGET(*data));
taskItem = GTK_WIDGET(*data);
g_assert(TASK_IS_ITEM(taskItem));
if(taskItem == widget) break; //source and target are identical
- gint target_position = grid_get_pos(wp_applet_get_tasks(item->windowPickerApplet), widget);
+ target_position = grid_get_pos(wp_applet_get_tasks(item->windowPickerApplet), widget);
g_object_ref(taskItem);
gtk_box_reorder_child(GTK_BOX(taskList), taskItem, target_position);
g_object_unref(taskItem);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]