[gnome-commander] Replacing obsoleted gtk_signal_connect() with g_signal_connect()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Replacing obsoleted gtk_signal_connect() with g_signal_connect()
- Date: Fri, 10 Jun 2011 20:12:13 +0000 (UTC)
commit 96525d221735d2e4829668e4e2cb2e0873ed0fdc
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Fri Jun 10 22:10:30 2011 +0200
Replacing obsoleted gtk_signal_connect() with g_signal_connect()
libgcmd/libgcmd-widget-factory.cc | 8 ++++----
libgcmd/libgcmd-widget-factory.h | 16 ++++++++--------
2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/libgcmd/libgcmd-widget-factory.cc b/libgcmd/libgcmd-widget-factory.cc
index 49c5403..669abf4 100644
--- a/libgcmd/libgcmd-widget-factory.cc
+++ b/libgcmd/libgcmd-widget-factory.cc
@@ -207,7 +207,7 @@ GtkWidget *create_category (GtkWidget *parent, GtkWidget *content, gchar *title)
}
-GtkWidget *create_named_button_with_data (GtkWidget *parent, const gchar *label, const gchar *name, GtkSignalFunc func, gpointer data)
+GtkWidget *create_named_button_with_data (GtkWidget *parent, const gchar *label, const gchar *name, GCallback func, gpointer data)
{
guint key;
GtkAccelGroup *accel_group = gtk_accel_group_new ();
@@ -220,20 +220,20 @@ GtkWidget *create_named_button_with_data (GtkWidget *parent, const gchar *label,
g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
gtk_widget_show (w);
if (func)
- gtk_signal_connect (GTK_OBJECT (w), "clicked", func, data);
+ g_signal_connect (w, "clicked", func, data);
return w;
}
-GtkWidget * create_named_stock_button_with_data (GtkWidget *parent, gconstpointer stock, const gchar *name, GtkSignalFunc func, gpointer data)
+GtkWidget *create_named_stock_button_with_data (GtkWidget *parent, gconstpointer stock, const gchar *name, GCallback func, gpointer data)
{
GtkWidget *w = gtk_button_new_from_stock ((const gchar *) stock);
g_object_ref (w);
g_object_set_data_full (G_OBJECT (parent), name, w, g_object_unref);
gtk_widget_show (w);
if (func)
- gtk_signal_connect (GTK_OBJECT (w), "clicked", func, data);
+ g_signal_connect (w, "clicked", func, data);
return w;
}
diff --git a/libgcmd/libgcmd-widget-factory.h b/libgcmd/libgcmd-widget-factory.h
index 00b8371..c9b2736 100644
--- a/libgcmd/libgcmd-widget-factory.h
+++ b/libgcmd/libgcmd-widget-factory.h
@@ -59,36 +59,36 @@ GtkWidget *create_space_hbox (GtkWidget *parent, GtkWidget *content);
GtkWidget *create_category (GtkWidget *parent, GtkWidget *content, gchar *title);
-GtkWidget *create_named_button_with_data (GtkWidget *parent, const gchar *label, const gchar *name, GtkSignalFunc func, gpointer data);
+GtkWidget *create_named_button_with_data (GtkWidget *parent, const gchar *label, const gchar *name, GCallback func, gpointer data);
-inline GtkWidget *create_button_with_data (GtkWidget *parent, const gchar *label, GtkSignalFunc func, gpointer data)
+inline GtkWidget *create_button_with_data (GtkWidget *parent, const gchar *label, GCallback func, gpointer data)
{
return create_named_button_with_data (parent, label, "button", func, data);
}
-inline GtkWidget *create_button (GtkWidget *parent, const gchar *label, GtkSignalFunc func)
+inline GtkWidget *create_button (GtkWidget *parent, const gchar *label, GCallback func)
{
return create_button_with_data (parent, label, func, parent);
}
-inline GtkWidget *create_named_button (GtkWidget *parent, const gchar *label, const gchar *name, GtkSignalFunc func)
+inline GtkWidget *create_named_button (GtkWidget *parent, const gchar *label, const gchar *name, GCallback func)
{
return create_named_button_with_data (parent, label, name, func, parent);
}
-GtkWidget *create_named_stock_button_with_data (GtkWidget *parent, gconstpointer stock, const gchar *name, GtkSignalFunc func, gpointer data);
+GtkWidget *create_named_stock_button_with_data (GtkWidget *parent, gconstpointer stock, const gchar *name, GCallback func, gpointer data);
-inline GtkWidget *create_stock_button_with_data (GtkWidget *parent, gconstpointer stock, GtkSignalFunc func, gpointer data)
+inline GtkWidget *create_stock_button_with_data (GtkWidget *parent, gconstpointer stock, GCallback func, gpointer data)
{
return create_named_stock_button_with_data (parent, stock, "button", func, data);
}
-inline GtkWidget *create_named_stock_button (GtkWidget *parent, gconstpointer stock, const gchar *name, GtkSignalFunc func)
+inline GtkWidget *create_named_stock_button (GtkWidget *parent, gconstpointer stock, const gchar *name, GCallback func)
{
return create_named_stock_button_with_data (parent, stock, name, func, parent);
}
-inline GtkWidget *create_stock_button (GtkWidget *parent, gconstpointer stock, GtkSignalFunc func)
+inline GtkWidget *create_stock_button (GtkWidget *parent, gconstpointer stock, GCallback func)
{
return create_stock_button_with_data (parent, stock, func, parent);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]