[monkey-bubble: 708/753] Use g_signal_* and g_object_* instead of gtk_signal_* and gtk_object_*,



commit 5a2725d148e5173fff00899fb2dd9a8588b9a473
Author: Federico Mena Quintero <federico ximian com>
Date:   Thu Feb 21 22:12:17 2002 +0000

    Use g_signal_* and g_object_* instead of gtk_signal_* and gtk_object_*,
    
    2002-02-21  Federico Mena Quintero  <federico ximian com>
    
    	* libgnomeui/gnome-dialog.c: Use
    	g_signal_* and g_object_* instead of gtk_signal_* and
    	gtk_object_*, respectively.
    	* libgnomeui/gnome-dateedit.c: Likewise.
    	* libgnomeui/gnome-color-picker.c: Likewise.
    	* libgnomeui/gnome-client.c: Likewise.
    	* libgnomeui/gnome-appbar.c: Likewise.
    	* libgnomeui/gnome-app-util.c: Likewise.
    	* libgnomeui/gnome-app-helper.c: Likewise.
    	* libgnomeui/gnome-dialog-util.c: Likewise.
    	* libgnomeui/gnome-druid.c: Likewise.
    	* libgnomeui/gnome-druid-page.c: Likewise.
    	* libgnomeui/gnome-entry.c: Likewise.
    
    	* libgnomeui/gnome-file-entry.c: Likewise.
    
    	* libgnomeui/gnome-font-picker.c: Likewise.
    
    	* libgnomeui/gnome-gconf-ui.c: Likewise.
    	* libgnomeui/gnome-href.c: Likewise.
    
    	* libgnomeui/gnome-ice.c: Likewise.
    	* libgnomeui/gnome-icon-entry.c: Likewise.
    
    	* libgnomeui/gnome-icon-item.c: Likewise.
    
    	* libgnomeui/gnome-icon-list.c: Likewise.
    	* libgnomeui/gnome-mdi.c: Likewise.
    
    	* libgnomeui/gnome-mdi-child.c: Likewise.
    	* libgnomeui/gnome-mdi-generic-child.c: Likewise.
    
    	* libgnomeui/gnome-pixmap-entry.c: Likewise.
    	* libgnomeui/gnome-popup-menu.c: Likewise.
    
    	* libgnomeui/gnome-propertybox.c: Likewise.
    
    	* libgnomeui/gnome-scores.c: Likewise.
    
    	* glade/glade-gnome.c: Likewise.
    
    	* test-gnome/testgnome.c: Likewise.
    
    	* libgnomeui/gnome-appbar.c (gnome_appbar_get_progress): Return a
    	GtkProgressBar, not a deprecated GtkProgress.
    	(gnome_appbar_constructor): gtk_widget_set_usize() ->
    	gtk_widget_set_size_request().
    
    	* libgnomeui/gnome-color-picker.c
    	(gnome_color_picker_instance_init): gtk_drawing_area_size() ->
    	gtk_widget_set_size_request().
    	(cs_ok_clicked): Use the new color selection API.
    	(gnome_color_picker_clicked): Likewise.
    	(gnome_color_picker_set_d): gtk_widget_draw() -> gtk_widget_queue_draw().
    	(gnome_color_picker_set_i8): Likewise.
    	(gnome_color_picker_set_i16): Likewise.
    	(gnome_color_picker_set_dither): Likewise.
    	(gnome_color_picker_set_use_alpha): Likewise.
    
    	* libgnomeui/gnome-dateedit.c (position_popup): Use
    	gtk_widget_set_uposition() -> gtk_window_move().
    	(create_children): gtk_widget_set_usize() ->
    	gtk_widget_set_size_request().  gtk_entry_new_with_max_length() ->
    	gtk_entry_new() with gtk_entry_set_max_length().
    	gtk_window_set_policy() -> gtk_window_set_resizable().
    
    	* libgnomeui/gnome-dialog.c (gnome_dialog_init):
    	gtk_window_set_policy() -> gtk_window_set_resizable().
    	(gnome_dialog_set_parent): gtk_widget_set_uposition() ->
    	gtk_window_move().
    
    	* libgnomeui/gnome-entry.c (set_combo_items): Re-create the list
    	of items for the combo and use gtk_combo_set_popdown_strings().
    	We cannot longer use the GtkList deprecated functions.
    	(gnome_entry_add_history): Keep the items list in the same order
    	as specified, and use set_combo_items() instead of inserting the
    	item string directly into the GtkCombo list.
    
    	* libgnomeui/gnome-file-entry.c (browse_clicked):
    	gtk_widget_set_uposition() -> gtk_window_move().
    
    	* libgnomeui/gnome-font-picker.c: Be stricter in what we don't
    	compile when building with GTK_DISABLE_DEPRECATED.
    	(gnome_font_picker_fi_set_use_font_in_label):
    	gtk_widget_restore_default_style() -> gtk_widget_set_style().
    
    	* libgnomeui/gnome-href.c (gnome_href_get_text): gtk_label_get()
    	-> gtk_label_get_text().
    
    	* libgnomeui/gnome-messagebox.c (gnome_message_box_construct):
    	gtk_widget_set_usize() -> gtk_widget_set_size_request().
    
    	* libgnomeui/gnome-mdi.c (book_button_release):
    	gtk_widget_set_usize() -> gtk_widget_set_size_request().
    	(app_create): Removed unneeded gtk_window_set_policy().
    	(gnome_mdi_set_mode): gtk_widget_set_usize() ->
    	gtk_widget_set_size_request().
    
    	* libgnomeui/gnome-mdi-generic-child.c: Be stricter in what we
    	don't compile when building with GTK_DISABLE_DEPRECATED.
    
    	* libgnomeui/gnome-mdi-session.c (restore_window_child):
    	gtk_widget_set_usize() -> gtk_window_set_default_size().
    	gtk_widget_set_uposition() -> gtk_window_move().
    	(restore_window): Likewise.
    
    	* libgnomeui/gnome-popup-menu.c (relay_popup_button_pressed):
    	Don't leak the list of the container's children.
    
    	* libgnomeui/gnome-propertybox.c (dialog_clicked_cb):
    	gtk_notebook_current_page() -> gtk_notebook_get_current_page().
    
    	* libgnomeui/gnome-icon-entry.c (browse_clicked):
    	gtk_widget_set_usize() -> gtk_widget_set_size_request().
    	(ientry_browse): Removed unused gtk_window_set_policy().
    	(gnome_icon_entry_instance_init): gtk_widget_set_usize() ->
    	gtk_widget_set_size_request().
    
    	* libgnomeui/gnome-icon-item.c (iti_start_editing):
    	set_uposition() -> window_move().
    	(gnome_icon_text_item_draw): gtk_draw_focus() ->
    	gtk_paint_focus().
    
    	* libgnomeui/gnome-icon-sel.c
    	(gnome_icon_selection_instance_init): usize() -> size_request().
    	(load_idle_func): progress_bar_update() -> progress_bar_set_fraction().

 libgnomeui/gnome-scores.c |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/libgnomeui/gnome-scores.c b/libgnomeui/gnome-scores.c
index f35ae74..75def49 100644
--- a/libgnomeui/gnome-scores.c
+++ b/libgnomeui/gnome-scores.c
@@ -68,7 +68,7 @@ static void gnome_scores_finalize   (GObject          *object);
 GNOME_CLASS_BOILERPLATE (GnomeScores, gnome_scores,
 			 GtkDialog, GTK_TYPE_DIALOG);
 
-static void 
+static void
 gnome_scores_instance_init (GnomeScores *gs)
 {
 	GtkWidget *label;
@@ -106,9 +106,9 @@ gnome_scores_instance_init (GnomeScores *gs)
 
 	gtk_container_set_border_width (GTK_CONTAINER (gs), 5);
 
-	gtk_signal_connect_object (GTK_OBJECT (gs), "response",
-				   GTK_SIGNAL_FUNC (gtk_widget_destroy),
-				   GTK_OBJECT (gs));
+	g_signal_connect_swapped (gs, "response",
+				  G_CALLBACK (gtk_widget_destroy),
+				  gs);
 
 	gs->_priv->logo_container = gtk_hbox_new(FALSE, 0);
 	gtk_widget_show(gs->_priv->logo_container);
@@ -161,8 +161,8 @@ gnome_scores_finalize(GObject *object)
  */
 void
 gnome_scores_construct (  GnomeScores *gs,
-			  guint n_scores, 
-			  gchar **names, 
+			  guint n_scores,
+			  gchar **names,
 			  gfloat *scores,
 			  time_t *times,
 			  gboolean clear)
@@ -212,7 +212,7 @@ gnome_scores_construct (  GnomeScores *gs,
 		gtk_table_attach_defaults ( gs->_priv->table, gs->_priv->label_times[i], 2, 3, i+1, i+2);
   	}
 
-	/* 
+	/*
 	if(clear) {
 	  gs->_priv->but_clear = gtk_button_new_with_label ( _("Clear") );
 	  gtk_widget_show (gs->_priv->but_clear);
@@ -233,14 +233,14 @@ gnome_scores_construct (  GnomeScores *gs,
  *
  * Returns: A new #GnomeScores widget
  */
-GtkWidget * 
-gnome_scores_new (  guint n_scores, 
-		    gchar **names, 
+GtkWidget *
+gnome_scores_new (  guint n_scores,
+		    gchar **names,
 		    gfloat *scores,
 		    time_t *times,
 		    gboolean clear)
 {
-	GtkWidget *retval = gtk_type_new (GNOME_TYPE_SCORES);
+	GtkWidget *retval = g_object_new (GNOME_TYPE_SCORES, NULL);
 
 	gnome_scores_construct(GNOME_SCORES(retval), n_scores, names, scores, times, clear);
 
@@ -275,7 +275,7 @@ gnome_scores_set_color(GnomeScores *gs, guint n, GdkColor *col)
 	gtk_widget_set_style(GTK_WIDGET(gs->_priv->label_scores[n]), s);
 	gtk_widget_set_style(GTK_WIDGET(gs->_priv->label_times[n]), s);
 
-	gtk_style_unref(s);
+	g_object_unref (G_OBJECT (s));
 }
 
 /**
@@ -415,7 +415,7 @@ gnome_scores_set_logo_label (GnomeScores *gs,
 
 	gs->_priv->logo = gtk_label_new(txt);
 	gtk_widget_set_style(GTK_WIDGET(gs->_priv->logo), s);
-	gtk_style_unref(s);
+	g_object_unref (G_OBJECT (s));
 	gtk_container_add(GTK_CONTAINER(gs->_priv->logo_container), gs->_priv->logo);
 	gtk_widget_show (gs->_priv->logo);
 }
@@ -484,7 +484,7 @@ gnome_scores_set_logo_pixmap (GnomeScores *gs, const gchar *pix_name)
  * @level: Level of the game or %NULL.
  * @pos: Position in the top ten of the current player, as returned by gnome_score_log.
  *
- * Description:  Does all the work of displaying the best scores. 
+ * Description:  Does all the work of displaying the best scores.
  * It calls gnome_score_get_notables to retrieve the info, creates the window,
  * and show it.
  *
@@ -506,12 +506,12 @@ gnome_scores_display (const gchar *title, const gchar *app_name, const gchar *le
 		gnome_scores_set_logo_label_title (GNOME_SCORES(hs), title);
 		if(pos)
  			gnome_scores_set_current_player(GNOME_SCORES(hs), pos-1);
-		
+
 		gtk_widget_show (hs);
 		g_strfreev(names);
 		g_free(scores);
 		g_free(scoretimes);
-	} 
+	}
 
 	return hs;
 }
@@ -523,7 +523,7 @@ gnome_scores_display (const gchar *title, const gchar *app_name, const gchar *le
  * @level: Level of the game or %NULL.
  * @pos: Position in the top ten of the current player, as returned by gnome_score_log.
  *
- * Description:  Does all the work of displaying the best scores. 
+ * Description:  Does all the work of displaying the best scores.
  * It calls gnome_score_get_notables to retrieve the info, creates the window,
  * and show it.
  *
@@ -545,12 +545,12 @@ gnome_scores_display_with_pixmap (const gchar *pixmap_logo, const gchar *app_nam
 		gnome_scores_set_logo_pixmap (GNOME_SCORES(hs), pixmap_logo);
 		if(pos)
  			gnome_scores_set_current_player(GNOME_SCORES(hs), pos-1);
-		
+
 		gtk_widget_show (hs);
 		g_strfreev(names);
 		g_free(scores);
 		g_free(scoretimes);
-	} 
+	}
 
 	return hs;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]