Commit d6a73fd5 authored by Alberto Garcia's avatar Alberto Garcia Committed by Christian Dywan

Assign all g_signal_connect() and friends to gulong variables

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=87821
parent 56d5b454
......@@ -2287,7 +2287,7 @@ gtk_button_screen_changed (GtkWidget *widget,
{
GtkButton *button;
GtkSettings *settings;
guint show_image_connection;
gulong show_image_connection;
if (!gtk_widget_has_screen (widget))
return;
......@@ -2305,18 +2305,14 @@ gtk_button_screen_changed (GtkWidget *widget,
settings = gtk_widget_get_settings (widget);
show_image_connection =
GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (settings),
"gtk-button-connection"));
g_signal_handler_find (settings, G_SIGNAL_MATCH_FUNC, 0, 0,
NULL, gtk_button_setting_changed, NULL);
if (show_image_connection)
return;
show_image_connection =
g_signal_connect (settings, "notify::gtk-button-images",
G_CALLBACK (gtk_button_setting_changed), NULL);
g_object_set_data (G_OBJECT (settings),
I_("gtk-button-connection"),
GUINT_TO_POINTER (show_image_connection));
g_signal_connect (settings, "notify::gtk-button-images",
G_CALLBACK (gtk_button_setting_changed), NULL);
show_image_change_notify (button);
}
......
......@@ -40,7 +40,7 @@ struct _GtkCellRendererComboPrivate
gint text_column;
guint focus_out_id;
gulong focus_out_id;
};
......
......@@ -71,7 +71,7 @@ struct _GtkClipboard
GdkAtom *cached_targets;
gint n_cached_targets;
guint notify_signal_id;
gulong notify_signal_id;
gboolean storing_selection;
GMainLoop *store_loop;
guint store_timeout;
......
......@@ -125,10 +125,10 @@ struct _GtkComboBoxPrivate
GtkWidget *popup_window;
GtkWidget *scrolled_window;
guint inserted_id;
guint deleted_id;
guint reordered_id;
guint changed_id;
gulong inserted_id;
gulong deleted_id;
gulong reordered_id;
gulong changed_id;
guint popup_idle_id;
guint activate_button;
guint32 activate_time;
......
......@@ -1045,7 +1045,7 @@ gtk_image_menu_item_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen)
{
GtkSettings *settings;
guint show_image_connection;
gulong show_image_connection;
if (!gtk_widget_has_screen (widget))
return;
......@@ -1053,18 +1053,14 @@ gtk_image_menu_item_screen_changed (GtkWidget *widget,
settings = gtk_widget_get_settings (widget);
show_image_connection =
GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (settings),
"gtk-image-menu-item-connection"));
g_signal_handler_find (settings, G_SIGNAL_MATCH_FUNC, 0, 0,
NULL, gtk_image_menu_item_setting_changed, NULL);
if (show_image_connection)
return;
show_image_connection =
g_signal_connect (settings, "notify::gtk-menu-images",
G_CALLBACK (gtk_image_menu_item_setting_changed), NULL);
g_object_set_data (G_OBJECT (settings),
I_("gtk-image-menu-item-connection"),
GUINT_TO_POINTER (show_image_connection));
g_signal_connect (settings, "notify::gtk-menu-images",
G_CALLBACK (gtk_image_menu_item_setting_changed), NULL);
show_image_change_notify (GTK_IMAGE_MENU_ITEM (widget));
}
......@@ -87,7 +87,7 @@ struct _GtkPageSetupUnixDialogPrivate
GtkWidget *landscape_radio;
GtkWidget *reverse_landscape_radio;
guint request_details_tag;
gulong request_details_tag;
GtkPrinter *request_details_printer;
GtkPrintSettings *print_settings;
......
......@@ -248,7 +248,7 @@ struct GtkPrintUnixDialogPrivate
GtkPrinter *current_printer;
GtkPrinter *request_details_printer;
guint request_details_tag;
gulong request_details_tag;
GtkPrinterOptionSet *options;
gulong options_changed_handler;
gulong mark_conflicts_id;
......
......@@ -118,7 +118,7 @@ struct _GtkTextViewPrivate
GdkDevice *grab_device;
GdkDevice *dnd_device;
guint selection_drag_handler;
gulong selection_drag_handler;
guint scroll_timeout;
GtkTextWindow *text_window;
......
......@@ -138,7 +138,7 @@ struct _GtkToolItemGroupInfo
{
GtkToolItemGroup *widget;
guint notify_collapsed;
gulong notify_collapsed;
guint pos;
guint exclusive : 1;
guint expand : 1;
......
......@@ -106,11 +106,11 @@ struct _GtkTreeModelFilterPrivate
gboolean virtual_root_deleted;
/* signal ids */
guint changed_id;
guint inserted_id;
guint has_child_toggled_id;
guint deleted_id;
guint reordered_id;
gulong changed_id;
gulong inserted_id;
gulong has_child_toggled_id;
gulong deleted_id;
gulong reordered_id;
};
/* properties */
......
......@@ -62,11 +62,11 @@ struct _GtkTreeModelSort
GDestroyNotify GSEAL (default_sort_destroy);
/* signal ids */
guint GSEAL (changed_id);
guint GSEAL (inserted_id);
guint GSEAL (has_child_toggled_id);
guint GSEAL (deleted_id);
guint GSEAL (reordered_id);
gulong GSEAL (changed_id);
gulong GSEAL (inserted_id);
gulong GSEAL (has_child_toggled_id);
gulong GSEAL (deleted_id);
gulong GSEAL (reordered_id);
};
struct _GtkTreeModelSortClass
......
......@@ -242,7 +242,7 @@ struct _GtkTreeViewPrivate
GDestroyNotify search_position_destroy;
GtkWidget *search_window;
GtkWidget *search_entry;
guint search_entry_changed_id;
gulong search_entry_changed_id;
guint typeselect_flush_timeout;
/* Grid and tree lines */
......
......@@ -68,7 +68,7 @@ struct _GtkTreeViewColumn
GdkWindow *GSEAL (window);
GtkCellEditable *GSEAL (editable_widget);
gfloat GSEAL (xalign);
guint GSEAL (property_changed_signal);
gulong GSEAL (property_changed_signal);
gint GSEAL (spacing);
/* Sizing fields */
......@@ -90,8 +90,8 @@ struct _GtkTreeViewColumn
GList *GSEAL (cell_list);
/* Sorting */
guint GSEAL (sort_clicked_signal);
guint GSEAL (sort_column_changed_signal);
gulong GSEAL (sort_clicked_signal);
gulong GSEAL (sort_column_changed_signal);
gint GSEAL (sort_column_id);
GtkSortType GSEAL (sort_order);
......
......@@ -167,7 +167,7 @@ typedef struct
{
GQueue *queue;
GtkTreeModel *client;
guint signal_ids[LAST_SIGNAL];
gulong signal_ids[LAST_SIGNAL];
}
SignalMonitor;
......
......@@ -214,28 +214,17 @@ gail_container_real_initialize (AtkObject *obj,
gpointer data)
{
GailContainer *container = GAIL_CONTAINER (obj);
guint handler_id;
ATK_OBJECT_CLASS (gail_container_parent_class)->initialize (obj, data);
container->children = gtk_container_get_children (GTK_CONTAINER (data));
/*
* We store the handler ids for these signals in case some objects
* need to remove these handlers.
*/
handler_id = g_signal_connect (data,
"add",
G_CALLBACK (gail_container_add_gtk),
obj);
g_object_set_data (G_OBJECT (obj), "gail-add-handler-id",
GUINT_TO_POINTER (handler_id));
handler_id = g_signal_connect (data,
"remove",
G_CALLBACK (gail_container_remove_gtk),
obj);
g_object_set_data (G_OBJECT (obj), "gail-remove-handler-id",
GUINT_TO_POINTER (handler_id));
g_signal_connect (data, "add",
G_CALLBACK (gail_container_add_gtk),
obj);
g_signal_connect (data, "remove",
G_CALLBACK (gail_container_remove_gtk),
obj);
if (GTK_IS_TOOLBAR (data))
obj->role = ATK_ROLE_TOOL_BAR;
......
......@@ -43,7 +43,7 @@ struct _GailLabel
gint cursor_position;
gint selection_bound;
gint label_length;
guint window_create_handler;
gulong window_create_handler;
gboolean has_top_level;
};
......
......@@ -28,7 +28,7 @@ typedef struct
{
gpointer instance;
GObject *alive_object;
guint id;
gulong id;
} DisconnectData;
static void
......@@ -102,7 +102,7 @@ typedef struct
{
GObject *obj;
GParamSpec *spec;
gint modified_id;
gulong modified_id;
} ObjectProperty;
static void
......
......@@ -42,7 +42,7 @@ typedef struct _CalendarData
GHashTable *details_table;
GtkTextBuffer *details_buffer;
guint details_changed;
gulong details_changed;
} CalendarData;
enum
......
......@@ -3711,7 +3711,7 @@ create_message_dialog (GtkWidget *widget)
static GtkWidget *sw_parent = NULL;
static GtkWidget *sw_float_parent;
static guint sw_destroyed_handler = 0;
static gulong sw_destroyed_handler = 0;
static gboolean
scrolled_windows_delete_cb (GtkWidget *widget, GdkEventAny *event, GtkWidget *scrollwin)
......@@ -5673,8 +5673,8 @@ create_display_screen (GtkWidget *widget)
/* Event Watcher
*/
static gboolean event_watcher_enter_id = 0;
static gboolean event_watcher_leave_id = 0;
static gulong event_watcher_enter_id = 0;
static gulong event_watcher_leave_id = 0;
static gboolean
event_watcher (GSignalInvocationHint *ihint,
......@@ -8635,7 +8635,7 @@ struct PropertiesData {
GtkWidget **window;
GdkCursor *cursor;
gboolean in_query;
gint handler;
gulong handler;
};
static void
......
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