aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/ChangeLog73
-rw-r--r--widgets/misc/e-calendar.c42
-rw-r--r--widgets/misc/e-cell-date-edit.c36
-rw-r--r--widgets/misc/e-cell-percent.c10
-rw-r--r--widgets/misc/e-clipped-label.c2
-rw-r--r--widgets/misc/e-combo-button.c8
-rw-r--r--widgets/misc/e-combo-cell-editable.c2
-rw-r--r--widgets/misc/e-config-page.c2
-rw-r--r--widgets/misc/e-dateedit.c6
-rw-r--r--widgets/misc/e-dateedit.h2
-rw-r--r--widgets/misc/e-dropdown-button.c6
-rw-r--r--widgets/misc/e-filter-bar.c4
-rw-r--r--widgets/misc/e-map.c8
-rw-r--r--widgets/misc/e-multi-config-dialog.c11
-rw-r--r--widgets/misc/e-search-bar.c3
-rw-r--r--widgets/misc/e-task-widget.c3
-rw-r--r--widgets/misc/e-url-entry.c2
-rw-r--r--widgets/misc/gal-combo-box.c19
-rw-r--r--widgets/misc/gal-combo-text.c2
-rw-r--r--widgets/misc/test-calendar.c4
-rw-r--r--widgets/misc/test-dropdown-button.c18
-rw-r--r--widgets/misc/test-info-label.c4
-rw-r--r--widgets/misc/test-multi-config-dialog.c4
23 files changed, 172 insertions, 99 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index de72bfed87..2c2f245a68 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,76 @@
+2007-04-19 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #429422
+
+ * e-combo-cell-editable.c (ecce_init):
+ * e-dateedit.c (e_date_edit_set_editable):
+ Use gtk_editable_set_editable() instead of gtk_entry_set_editable().
+
+ * e-dateedit.c (create_children):
+ * e-cell-date-edit.c (e_cell_date_edit_init):
+ Use gtk_box_set_spacing() instead of gtk_button_box_set_spacing().
+ Remove gtk_button_box_set_child_ipadding() and
+ gtk_button_box_set_child_size(). Use style properties instead.
+
+ * e-clipped-label.c (e_clipped_label_new):
+ * e-combo-button.c (e_combo_button_new):
+ * e-config-page.c (e_config_page_init):
+ * e-multi-config-dialog.c (e_multi_config_dialog_init):
+ * e-dropdown-button.c (e_dropdown_button_new):
+ * e-cell-date-edit.c (e_cell_date_edit_new):
+ * e-filter-bar.c (e_filter_bar_new):
+ * e-url-entry.c (mnemonic_activate):
+ * e-map.c (e_map_new):
+ * e-search-bar.c (e_search_bar_new):
+ * e-calendar.c (e_calendar_new):
+ Use g_object_new() instead of gtk_type_new().
+
+ * test-calendar.c (main):
+ * test-info-label.c (main):
+ * test-multi-config-dialog.c (main):
+ * test-dropdown-button.c (main):
+ Use gnome_program_init() instead of gnome_init().
+
+ * e-combo-button.c (impl_released):
+ Replace gtk_widget_draw() with GTK's 2-line implementation.
+
+ * e-multi-config-dialog.c (set_page_timeout_callback),
+ (e_multi_config_dialog_show_page):
+ Use gtk_notebook_set_current_page() instead of
+ gtk_notebook_set_page().
+
+ * e-dropdown-button.c (impl_destroy):
+ Use g_object_unref() instead of gtk_accel_group_unref().
+
+ * e-cell-percent.c (show_percent_warning):
+ * e-cell-date-edit.c (e_cell_date_edit_show_time_invalid_warning):
+ Use GtkMessageDialog instead of GnomeMessageDialog.
+
+ * e-cell-date-edit.c (e_cell_date_edit_select_matching_time),
+ (e_cell_date_edit_on_time_selected):
+ Use gtk_label_get_text() instead of gtk_label_get().
+
+ * e-filter-bar.c (class_init):
+ * gal-combo-box.c (gal_combo_box_init), (gtk_combo_popup_tear_off),
+ (gtk_combo_popup_reparent):
+ * e-map.c (e_map_set_scroll_adjustments):
+ * e-task-widget.c (e_task_widget_construct):
+ Use g_object_ref_sink() instead of gtk_object_sink().
+
+ * gal-combo-box.c (gtk_combo_tearoff_bg_copy),
+ (gtk_combo_popup_reparent):
+ * gal-combo-text.c (gal_combo_text_construct):
+ Use gtk_widget_set_size_request() instead of gtk_widget_set_usize().
+
+ * test-dropdown-button.c:
+ Use GTK_STOCK_* constants instead of GNOME_STOCK_*.
+
+ * e-calendar.c (e_calendar_init):
+ Use g_signal_connect_swapped() instead of gtk_signal_connect_object().
+
+ * e-calendar.c (e_calendar_destroy), (e_calendar_stop_auto_move):
+ Use g_source_remove() instead of gtk_timeout_remove().
+
2007-04-11 Srinivasa Ragavan <sragavan@novell.com>
** Added spinner widgets.
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c
index 7933998445..741bdfb19d 100644
--- a/widgets/misc/e-calendar.c
+++ b/widgets/misc/e-calendar.c
@@ -155,15 +155,15 @@ e_calendar_init (ECalendar *cal)
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_widget_show (button);
- gtk_signal_connect_object (GTK_OBJECT (button), "pressed",
- G_CALLBACK (e_calendar_on_prev_pressed),
- GTK_OBJECT (cal));
- gtk_signal_connect_object (GTK_OBJECT (button), "released",
- G_CALLBACK (e_calendar_on_prev_released),
- GTK_OBJECT (cal));
- gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
- G_CALLBACK (e_calendar_on_prev_clicked),
- GTK_OBJECT (cal));
+ g_signal_connect_swapped (
+ button, "pressed",
+ G_CALLBACK (e_calendar_on_prev_pressed), cal);
+ g_signal_connect_swapped (
+ button, "released",
+ G_CALLBACK (e_calendar_on_prev_released), cal);
+ g_signal_connect_swapped (
+ button, "clicked",
+ G_CALLBACK (e_calendar_on_prev_clicked), cal);
pixmap = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
gtk_widget_show (pixmap);
@@ -179,15 +179,15 @@ e_calendar_init (ECalendar *cal)
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_widget_show (button);
- gtk_signal_connect_object (GTK_OBJECT (button), "pressed",
- G_CALLBACK (e_calendar_on_next_pressed),
- GTK_OBJECT (cal));
- gtk_signal_connect_object (GTK_OBJECT (button), "released",
- G_CALLBACK (e_calendar_on_next_released),
- GTK_OBJECT (cal));
- gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
- G_CALLBACK (e_calendar_on_next_clicked),
- GTK_OBJECT (cal));
+ g_signal_connect_swapped (
+ button, "pressed",
+ G_CALLBACK (e_calendar_on_next_pressed), cal);
+ g_signal_connect_swapped (
+ button, "released",
+ G_CALLBACK (e_calendar_on_next_released), cal);
+ g_signal_connect_swapped (
+ button, "clicked",
+ G_CALLBACK (e_calendar_on_next_clicked), cal);
pixmap = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
gtk_widget_show (pixmap);
@@ -221,7 +221,7 @@ e_calendar_new (void)
GtkWidget *cal;
AtkObject *a11y;
- cal = gtk_type_new (e_calendar_get_type ());
+ cal = g_object_new (e_calendar_get_type (), NULL);
a11y = gtk_widget_get_accessible (cal);
atk_object_set_name (a11y, _("Month Calendar"));
@@ -240,7 +240,7 @@ e_calendar_destroy (GtkObject *object)
cal = E_CALENDAR (object);
if (cal->timeout_id != 0) {
- gtk_timeout_remove (cal->timeout_id);
+ g_source_remove (cal->timeout_id);
cal->timeout_id = 0;
}
@@ -514,7 +514,7 @@ static void
e_calendar_stop_auto_move (ECalendar *cal)
{
if (cal->timeout_id != 0) {
- gtk_timeout_remove (cal->timeout_id);
+ g_source_remove (cal->timeout_id);
cal->timeout_id = 0;
}
}
diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c
index f8a4f134a2..14691b99b6 100644
--- a/widgets/misc/e-cell-date-edit.c
+++ b/widgets/misc/e-cell-date-edit.c
@@ -224,9 +224,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
bbox = gtk_hbutton_box_new ();
gtk_container_set_border_width (GTK_CONTAINER (bbox), 4);
- gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), 2);
- gtk_button_box_set_child_ipadding (GTK_BUTTON_BOX (bbox), 2, 0);
- gtk_button_box_set_child_size (GTK_BUTTON_BOX (bbox), 0, 0);
+ gtk_box_set_spacing (GTK_BOX (bbox), 2);
gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, FALSE, 0);
gtk_widget_show (bbox);
@@ -283,9 +281,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
ECell *
e_cell_date_edit_new (void)
{
- ECellDateEdit *ecde = gtk_type_new (e_cell_date_edit_get_type ());
-
- return (ECell*) ecde;
+ return g_object_new (e_cell_date_edit_get_type (), NULL);
}
@@ -513,14 +509,14 @@ e_cell_date_edit_select_matching_time (ECellDateEdit *ecde,
GtkWidget *listitem, *label;
GList *elem;
gboolean found = FALSE;
- char *list_item_text;
+ const gchar *list_item_text;
list = GTK_LIST (ecde->time_list);
elem = list->children;
while (elem) {
listitem = GTK_WIDGET (elem->data);
label = GTK_BIN (listitem)->child;
- gtk_label_get (GTK_LABEL (label), &list_item_text);
+ list_item_text = gtk_label_get_text (GTK_LABEL (label));
if (!strcmp (list_item_text, time)) {
found = TRUE;
@@ -777,7 +773,7 @@ e_cell_date_edit_show_time_invalid_warning (ECellDateEdit *ecde)
{
GtkWidget *dialog;
struct tm date_tm;
- char buffer[64], *message;
+ char buffer[64];
/* Create a useful error message showing the correct format. */
date_tm.tm_year = 100;
@@ -790,18 +786,16 @@ e_cell_date_edit_show_time_invalid_warning (ECellDateEdit *ecde)
e_time_format_time (&date_tm, ecde->use_24_hour_format, FALSE,
buffer, sizeof (buffer));
- message = g_strdup_printf (_("The time must be in the format: %s"),
- buffer);
-
- dialog = gnome_message_box_new (message, GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK, NULL);
/* FIXME: Fix transient settings - I'm not sure it works with popup
windows. Maybe we need to use a normal window without decorations.*/
- gtk_window_set_transient_for (GTK_WINDOW (dialog),
- GTK_WINDOW (ecde->popup_window));
- gnome_dialog_run (GNOME_DIALOG (dialog));
-
- g_free (message);
+ dialog = gtk_message_dialog_new (
+ GTK_WINDOW (ecde->popup_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+ _("The time must be in the format: %s"),
+ buffer);
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
}
@@ -899,14 +893,14 @@ e_cell_date_edit_on_time_selected (GtkList *list,
ECellDateEdit *ecde)
{
GtkWidget *listitem, *label;
- char *list_item_text;
+ const gchar *list_item_text;
if (!list->selection)
return;
listitem = list->selection->data;
label = GTK_BIN (listitem)->child;
- gtk_label_get (GTK_LABEL (label), &list_item_text);
+ list_item_text = gtk_label_get_text (GTK_LABEL (label));
gtk_entry_set_text (GTK_ENTRY (ecde->time_entry), list_item_text);
}
diff --git a/widgets/misc/e-cell-percent.c b/widgets/misc/e-cell-percent.c
index 76b4ffc06f..d50d0924b8 100644
--- a/widgets/misc/e-cell-percent.c
+++ b/widgets/misc/e-cell-percent.c
@@ -73,10 +73,12 @@ show_percent_warning (void)
{
GtkWidget *dialog;
- dialog = gnome_message_box_new (_("The percent value must be between 0 and 100, inclusive"),
- GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK, NULL);
- gtk_widget_show (dialog);
+ dialog = gtk_message_dialog_new (
+ NULL, 0,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+ _("The percent value must be between 0 and 100, inclusive"));
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
}
static void
diff --git a/widgets/misc/e-clipped-label.c b/widgets/misc/e-clipped-label.c
index 98e3ecf62e..0338f8529c 100644
--- a/widgets/misc/e-clipped-label.c
+++ b/widgets/misc/e-clipped-label.c
@@ -138,7 +138,7 @@ e_clipped_label_new (const gchar *text,
GtkWidget *label;
EClippedLabel *clipped;
- label = GTK_WIDGET (gtk_type_new (e_clipped_label_get_type ()));
+ label = g_object_new (e_clipped_label_get_type (), NULL);
clipped = E_CLIPPED_LABEL (label);
diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c
index 6a8bebb8ee..08da2c1eac 100644
--- a/widgets/misc/e-combo-button.c
+++ b/widgets/misc/e-combo-button.c
@@ -399,7 +399,11 @@ impl_released (GtkButton *button)
/* We _draw () instead of queue_draw so that if the
operation blocks, the label doesn't vanish. */
- gtk_widget_draw (GTK_WIDGET (button), NULL);
+ /* XXX gtk_widget_draw() is deprecated.
+ * Replace it with GTK's implementation. */
+ gtk_widget_queue_draw (GTK_WIDGET (button));
+ gdk_window_process_updates (
+ GTK_WIDGET (button)->window, TRUE);
}
}
}
@@ -542,7 +546,7 @@ e_combo_button_new (void)
{
EComboButton *new;
- new = gtk_type_new (e_combo_button_get_type ());
+ new = g_object_new (e_combo_button_get_type (), NULL);
e_combo_button_construct (new);
return GTK_WIDGET (new);
diff --git a/widgets/misc/e-combo-cell-editable.c b/widgets/misc/e-combo-cell-editable.c
index 5a39974f17..dc20ede481 100644
--- a/widgets/misc/e-combo-cell-editable.c
+++ b/widgets/misc/e-combo-cell-editable.c
@@ -327,7 +327,7 @@ ecce_init (EComboCellEditable *ecce)
entry = gtk_entry_new ();
ecce->priv->entry = GTK_ENTRY (entry);
gtk_entry_set_has_frame (ecce->priv->entry, FALSE);
- gtk_entry_set_editable (ecce->priv->entry, FALSE);
+ gtk_editable_set_editable (GTK_EDITABLE (ecce->priv->entry), FALSE);
g_signal_connect (entry, "activate", G_CALLBACK (entry_activated_cb), ecce);
g_signal_connect (entry, "key_press_event", G_CALLBACK (entry_key_press_event_cb), ecce);
gtk_widget_show (entry);
diff --git a/widgets/misc/e-config-page.c b/widgets/misc/e-config-page.c
index 7b3f288431..df8dcd023c 100644
--- a/widgets/misc/e-config-page.c
+++ b/widgets/misc/e-config-page.c
@@ -44,7 +44,7 @@ e_config_page_init (EConfigPage *page)
GtkWidget *
e_config_page_new (void)
{
- return gtk_type_new (e_config_page_get_type ());
+ return g_object_new (e_config_page_get_type (), NULL);
}
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 9706632c6e..a3e8dc21d8 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -452,9 +452,7 @@ create_children (EDateEdit *dedit)
bbox = gtk_hbutton_box_new ();
gtk_container_set_border_width (GTK_CONTAINER (bbox), 4);
- gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), 2);
- gtk_button_box_set_child_ipadding (GTK_BUTTON_BOX (bbox), 2, 0);
- gtk_button_box_set_child_size (GTK_BUTTON_BOX (bbox), 0, 0);
+ gtk_box_set_spacing (GTK_BOX (bbox), 2);
gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, FALSE, 0);
gtk_widget_show (bbox);
@@ -547,7 +545,7 @@ e_date_edit_set_editable (EDateEdit *dedit, gboolean editable)
priv = dedit->priv;
- gtk_entry_set_editable (GTK_ENTRY (priv->date_entry), editable);
+ gtk_editable_set_editable (GTK_EDITABLE (priv->date_entry), editable);
gtk_widget_set_sensitive (priv->date_button, editable);
}
diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h
index c8ee3f2832..cfd64e86bd 100644
--- a/widgets/misc/e-dateedit.h
+++ b/widgets/misc/e-dateedit.h
@@ -76,7 +76,7 @@ struct _EDateEditClass {
GType e_date_edit_get_type (void);
GtkWidget* e_date_edit_new (void);
-/* Analogous to gtk_entry_set_editable. disable editing, while still
+/* Analogous to gtk_editable_set_editable. disable editing, while still
allowing selection. */
void e_date_edit_set_editable (EDateEdit *dedit, gboolean editable);
diff --git a/widgets/misc/e-dropdown-button.c b/widgets/misc/e-dropdown-button.c
index f939175661..0b0f9e25c3 100644
--- a/widgets/misc/e-dropdown-button.c
+++ b/widgets/misc/e-dropdown-button.c
@@ -30,7 +30,9 @@
#include <stdio.h>
#include <gtk/gtkarrow.h>
+#include <gtk/gtkhbox.h>
#include <gtk/gtklabel.h>
+#include <gtk/gtksignal.h>
#include <gtk/gtkwidget.h>
#include <libgnomeui/gnome-popup-menu.h>
@@ -99,7 +101,7 @@ impl_destroy (GtkObject *object)
dropdown_button = E_DROPDOWN_BUTTON (object);
priv = dropdown_button->priv;
- gtk_accel_group_unref (priv->accel_group);
+ g_object_unref (priv->accel_group);
gtk_widget_destroy (priv->menu);
g_free (priv);
@@ -230,7 +232,7 @@ e_dropdown_button_new (const char *label_text,
g_return_val_if_fail (menu != NULL, NULL);
g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
- widget = gtk_type_new (e_dropdown_button_get_type ());
+ widget = g_object_new (e_dropdown_button_get_type (), NULL);
e_dropdown_button_construct (E_DROPDOWN_BUTTON (widget), label_text, menu);
return widget;
diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c
index b94e5f21da..0c1fce045c 100644
--- a/widgets/misc/e-filter-bar.c
+++ b/widgets/misc/e-filter-bar.c
@@ -915,7 +915,7 @@ class_init (EFilterBarClass *klass)
GTK_RUN_LAST,
object_class->type,
G_STRUCT_OFFSET (EFilterBarClass, menu_activated),
- gtk_marshal_NONE__INT,
+ g_cclosure_marshal_VOID__INT,
GTK_TYPE_NONE, 1, GTK_TYPE_INT);
gtk_object_class_add_signals (object_class, esb_signals, LAST_SIGNAL);
@@ -946,7 +946,7 @@ e_filter_bar_new (RuleContext *context,
EFilterBar *bar;
ESearchBarItem item = { NULL, -1, 0 };
- bar = gtk_type_new (e_filter_bar_get_type ());
+ bar = g_object_new (e_filter_bar_get_type (), NULL);
bar->context = context;
g_object_ref (context);
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 74359a26ac..e8b5956eb8 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -507,8 +507,7 @@ e_map_set_scroll_adjustments (GtkWidget *widget, GtkAdjustment *hadj, GtkAdjustm
if (priv->hadj != hadj)
{
priv->hadj = hadj;
- g_object_ref (priv->hadj);
- gtk_object_sink (GTK_OBJECT (priv->hadj));
+ g_object_ref_sink (priv->hadj);
g_signal_connect (priv->hadj, "value_changed",
G_CALLBACK (adjustment_changed_cb), view);
@@ -519,8 +518,7 @@ e_map_set_scroll_adjustments (GtkWidget *widget, GtkAdjustment *hadj, GtkAdjustm
if (priv->vadj != vadj)
{
priv->vadj = vadj;
- g_object_ref (priv->vadj);
- gtk_object_sink (GTK_OBJECT (priv->vadj));
+ g_object_ref_sink (priv->vadj);
g_signal_connect (priv->vadj, "value_changed",
G_CALLBACK (adjustment_changed_cb), view);
@@ -624,7 +622,7 @@ e_map_new ()
GtkWidget *widget;
AtkObject *a11y;
- widget = GTK_WIDGET (gtk_type_new (TYPE_E_MAP));
+ widget = g_object_new (TYPE_E_MAP, NULL);
a11y = gtk_widget_get_accessible (widget);
atk_object_set_name (a11y, _("World Map"));
atk_object_set_role (a11y, ATK_ROLE_IMAGE);
diff --git a/widgets/misc/e-multi-config-dialog.c b/widgets/misc/e-multi-config-dialog.c
index fef0a507a9..360c124f66 100644
--- a/widgets/misc/e-multi-config-dialog.c
+++ b/widgets/misc/e-multi-config-dialog.c
@@ -119,7 +119,8 @@ set_page_timeout_callback (void *data)
multi_config_dialog = E_MULTI_CONFIG_DIALOG (data);
priv = multi_config_dialog->priv;
- gtk_notebook_set_page (GTK_NOTEBOOK (priv->notebook), priv->set_page_timeout_page);
+ gtk_notebook_set_current_page (
+ GTK_NOTEBOOK (priv->notebook), priv->set_page_timeout_page);
priv->set_page_timeout_id = 0;
gtk_widget_grab_focus(priv->list_e_table);
@@ -372,11 +373,7 @@ e_multi_config_dialog_init (EMultiConfigDialog *multi_config_dialog)
GtkWidget *
e_multi_config_dialog_new (void)
{
- EMultiConfigDialog *dialog;
-
- dialog = gtk_type_new (e_multi_config_dialog_get_type ());
-
- return GTK_WIDGET (dialog);
+ return g_object_new (e_multi_config_dialog_get_type (), NULL);
}
@@ -440,6 +437,6 @@ e_multi_config_dialog_show_page (EMultiConfigDialog *dialog, int page)
priv = dialog->priv;
e_table_set_cursor_row (e_table_scrolled_get_table (E_TABLE_SCROLLED (priv->list_e_table)), page);
- gtk_notebook_set_page (GTK_NOTEBOOK (priv->notebook), page);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), page);
}
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index 6b20492e43..fdfaee0671 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -32,6 +32,7 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtkdrawingarea.h>
#include <gtk/gtkeventbox.h>
+#include <gtk/gtklabel.h>
#include <gtk/gtkmenuitem.h>
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtkradiomenuitem.h>
@@ -1255,7 +1256,7 @@ e_search_bar_new (ESearchBarItem *menu_items,
g_return_val_if_fail (option_items != NULL, NULL);
- widget = GTK_WIDGET (gtk_type_new (e_search_bar_get_type ()));
+ widget = g_object_new (e_search_bar_get_type (), NULL);
e_search_bar_construct (E_SEARCH_BAR (widget), menu_items, option_items);
diff --git a/widgets/misc/e-task-widget.c b/widgets/misc/e-task-widget.c
index 2f591ab49f..d0f52f9191 100644
--- a/widgets/misc/e-task-widget.c
+++ b/widgets/misc/e-task-widget.c
@@ -167,8 +167,7 @@ e_task_widget_construct (ETaskWidget *task_widget,
g_object_unref (mask);
priv->tooltips = gtk_tooltips_new ();
- g_object_ref (priv->tooltips);
- gtk_object_sink (GTK_OBJECT (priv->tooltips));
+ g_object_ref_sink (priv->tooltips);
e_task_widget_update (task_widget, information, -1.0);
}
diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c
index 06820c0dd0..5f2eb6cd50 100644
--- a/widgets/misc/e-url-entry.c
+++ b/widgets/misc/e-url-entry.c
@@ -150,7 +150,7 @@ mnemonic_activate (GtkWidget *widget, gboolean group_cycling)
GtkWidget *
e_url_entry_new (void)
{
- return gtk_type_new (E_TYPE_URL_ENTRY);
+ return g_object_new (E_TYPE_URL_ENTRY, NULL);
}
diff --git a/widgets/misc/gal-combo-box.c b/widgets/misc/gal-combo-box.c
index 49fddfb92f..ba010bc2d2 100644
--- a/widgets/misc/gal-combo-box.c
+++ b/widgets/misc/gal-combo-box.c
@@ -416,8 +416,7 @@ gal_combo_box_init (GalComboBox *combo_box)
*/
combo_box->priv->toplevel = gtk_window_new (GTK_WINDOW_POPUP);
- gtk_widget_ref (combo_box->priv->toplevel);
- gtk_object_sink (GTK_OBJECT (combo_box->priv->toplevel));
+ g_object_ref_sink (combo_box->priv->toplevel);
gtk_window_set_policy (GTK_WINDOW (combo_box->priv->toplevel),
FALSE, TRUE, FALSE);
@@ -509,8 +508,7 @@ gtk_combo_popup_tear_off (GalComboBox *combo, gboolean set_position)
/* FIXME: made this a toplevel, not a dialog ! */
tearoff = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_widget_ref (tearoff);
- gtk_object_sink (GTK_OBJECT (tearoff));
+ g_object_ref_sink (tearoff);
combo->priv->tearoff_window = tearoff;
gtk_widget_set_app_paintable (tearoff, TRUE);
g_signal_connect (tearoff, "key_press_event",
@@ -612,7 +610,7 @@ gtk_combo_tearoff_bg_copy (GalComboBox *combo)
0, 0, 0, 0, -1, -1);
g_object_unref (gc);
- gtk_widget_set_usize (combo->priv->tearoff_window,
+ gtk_widget_set_size_request (combo->priv->tearoff_window,
widget->allocation.width,
widget->allocation.height);
@@ -637,11 +635,10 @@ gtk_combo_popup_reparent (GtkWidget *popup,
GtkWidget *new_parent,
gboolean unrealize)
{
- GtkObject *object = GTK_OBJECT (popup);
- gboolean was_floating = GTK_OBJECT_FLOATING (object);
+ GObject *object = G_OBJECT (popup);
+ gboolean was_floating = g_object_is_floating (object);
- g_object_ref (object);
- gtk_object_sink (object);
+ g_object_ref_sink (object);
if (unrealize) {
g_object_ref (object);
@@ -651,10 +648,10 @@ gtk_combo_popup_reparent (GtkWidget *popup,
}
else
gtk_widget_reparent (GTK_WIDGET (popup), new_parent);
- gtk_widget_set_usize (new_parent, -1, -1);
+ gtk_widget_set_size_request (new_parent, -1, -1);
if (was_floating)
- GTK_OBJECT_SET_FLAGS (object, GTK_FLOATING);
+ g_object_force_floating (object);
else
g_object_unref (object);
}
diff --git a/widgets/misc/gal-combo-text.c b/widgets/misc/gal-combo-text.c
index ccec4b748d..fe75a7a353 100644
--- a/widgets/misc/gal-combo-text.c
+++ b/widgets/misc/gal-combo-text.c
@@ -392,7 +392,7 @@ gal_combo_text_construct (GalComboText *ct, gboolean const is_scrolled)
GTK_CONTAINER (list),
gtk_scrolled_window_get_vadjustment (
GTK_SCROLLED_WINDOW (scroll)));
- gtk_widget_set_usize (scroll, 0, 200); /* MAGIC NUMBER */
+ gtk_widget_set_size_request (scroll, 0, 200); /* MAGIC NUMBER */
} else
display_widget = list;
diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c
index 2b017ae6fe..4d341e25a4 100644
--- a/widgets/misc/test-calendar.c
+++ b/widgets/misc/test-calendar.c
@@ -67,7 +67,9 @@ main (int argc, char **argv)
GtkWidget *vbox;
ECalendarItem *calitem;
- gnome_init ("test-calendar", "0.0", argc, argv);
+ gnome_program_init (
+ "test-calendar", "0.0", LIBGNOMEUI_MODULE,
+ argc, argv, GNOME_PARAM_NONE);
app = gnome_app_new ("Test", "Test");
gtk_window_set_default_size (GTK_WINDOW (app), 400, 400);
diff --git a/widgets/misc/test-dropdown-button.c b/widgets/misc/test-dropdown-button.c
index 349176d05c..ab258c0c27 100644
--- a/widgets/misc/test-dropdown-button.c
+++ b/widgets/misc/test-dropdown-button.c
@@ -52,25 +52,25 @@ item_activated (GtkWidget *widget,
static GnomeUIInfo ui_info[] = {
{ GNOME_APP_UI_ITEM, "_New", "Create a new file", item_activated, "file/new", NULL,
- GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_NEW, 'n', GDK_CONTROL_MASK, NULL },
+ GNOME_APP_PIXMAP_STOCK, GTK_STOCK_NEW, 'n', GDK_CONTROL_MASK, NULL },
{ GNOME_APP_UI_ITEM, "_Open...", "Open an existing file", item_activated, "file/open", NULL,
- GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN, 'o', GDK_CONTROL_MASK, NULL },
+ GNOME_APP_PIXMAP_STOCK, GTK_STOCK_OPEN, 'o', GDK_CONTROL_MASK, NULL },
{ GNOME_APP_UI_ITEM, "_Save", "Save the current file", item_activated, "file/save", NULL,
- GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SAVE, 's', GDK_CONTROL_MASK, NULL },
+ GNOME_APP_PIXMAP_STOCK, GTK_STOCK_SAVE, 's', GDK_CONTROL_MASK, NULL },
{ GNOME_APP_UI_ITEM, "Save _as...", "Save the current file with a new name", item_activated, "file/save as", NULL,
- GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SAVE_AS, 0, 0, NULL },
+ GNOME_APP_PIXMAP_STOCK, GTK_STOCK_SAVE_AS, 0, 0, NULL },
GNOMEUIINFO_SEPARATOR,
{ GNOME_APP_UI_ITEM, "_Print...", "Print the current file", item_activated, "file/print", NULL,
- GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_PRINT, 'p', GDK_CONTROL_MASK, NULL },
+ GNOME_APP_PIXMAP_STOCK, GTK_STOCK_PRINT, 'p', GDK_CONTROL_MASK, NULL },
GNOMEUIINFO_SEPARATOR,
{ GNOME_APP_UI_ITEM, "_Close", "Close the current file", item_activated, "file/close", NULL,
- GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_CLOSE, 0, 0, NULL },
+ GNOME_APP_PIXMAP_STOCK, GTK_STOCK_CLOSE, 0, 0, NULL },
{ GNOME_APP_UI_ITEM, "E_xit", "Exit the program", item_activated, "file/exit", NULL,
- GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_EXIT, 'q', GDK_CONTROL_MASK, NULL },
+ GNOME_APP_PIXMAP_STOCK, GTK_STOCK_QUIT, 'q', GDK_CONTROL_MASK, NULL },
GNOMEUIINFO_END
};
@@ -82,7 +82,9 @@ main (int argc, char **argv)
GtkWidget *menu;
GtkWidget *dropdown_button;
- gnome_init ("test-dropdown-button", "0.0", argc, argv);
+ gnome_program_init (
+ "test-dropdown-button", "0.0", LIBGNOMEUI_MODULE,
+ argc, argv, GNOME_PARAM_NONE);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), 1, 1);
diff --git a/widgets/misc/test-info-label.c b/widgets/misc/test-info-label.c
index e4b053d81d..eb71e199a8 100644
--- a/widgets/misc/test-info-label.c
+++ b/widgets/misc/test-info-label.c
@@ -51,7 +51,9 @@ main (int argc, char **argv)
GtkWidget *label;
GtkWidget *vbox;
- gnome_init ("test-title-bar", "0.0", argc, argv);
+ gnome_program_init (
+ "test-title-bar", "0.0", LIBGNOMEUI_MODULE,
+ argc, argv, GNOME_PARAM_NONE);
e_icon_factory_init ();
app = gnome_app_new ("Test", "Test");
diff --git a/widgets/misc/test-multi-config-dialog.c b/widgets/misc/test-multi-config-dialog.c
index 1a56af9a30..5d72087803 100644
--- a/widgets/misc/test-multi-config-dialog.c
+++ b/widgets/misc/test-multi-config-dialog.c
@@ -76,7 +76,9 @@ main (int argc, char **argv)
{
GtkWidget *dialog;
- gnome_init ("test-multi-config-dialog", "0.0", argc, argv);
+ gnome_program_init (
+ "test-multi-config-dialog", "0.0", LIBGNOMEUI_MODULE,
+ argc, argv, GNOME_PARAM_NONE);
dialog = e_multi_config_dialog_new ();