aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog11
-rw-r--r--e-util/e-config.c6
-rw-r--r--e-util/e-cursor.c4
-rw-r--r--e-util/e-dialog-utils.c8
-rw-r--r--e-util/e-dialog-widgets.c109
-rw-r--r--e-util/e-dialog-widgets.h3
6 files changed, 20 insertions, 121 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 4b29efd710..69db24d87d 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,14 @@
+2009-04-24 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #572348
+
+ * e-config.c:
+ * e-cursor.c:
+ * e-dialog-utils.c:
+ * e-dialog-widgets.h:
+ * e-dialog-widgets.c:
+ Remove deprecated Gtk+ symbols.
+
2009-04-07 Tobias Mueller <tobiasmue@gnome.org>
** Fixes bug #577989
diff --git a/e-util/e-config.c b/e-util/e-config.c
index 4530d7a78b..1da54b5436 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -905,10 +905,10 @@ e_config_create_window(EConfig *emp, struct _GtkWindow *parent, const char *titl
g_signal_connect(w, "response", G_CALLBACK(ec_dialog_response), emp);
gtk_widget_ensure_style (w);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (w)->vbox), 0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (w)->action_area), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (w))), 0);
+ gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (w))), 12);
- gtk_box_pack_start((GtkBox *)((GtkDialog *)w)->vbox, emp->widget, TRUE, TRUE, 0);
+ gtk_box_pack_start((GtkBox *)gtk_dialog_get_content_area (((GtkDialog *)w)), emp->widget, TRUE, TRUE, 0);
} else {
/* response is handled directly by the druid stuff */
w = gtk_window_new(GTK_WINDOW_TOPLEVEL);
diff --git a/e-util/e-cursor.c b/e-util/e-cursor.c
index 97e3989f9b..7d547e38ac 100644
--- a/e-util/e-cursor.c
+++ b/e-util/e-cursor.c
@@ -47,7 +47,7 @@ void e_cursor_set (GtkWidget *widget, ECursorType cursor)
GdkCursor *window_cursor;
toplevel = gtk_widget_get_toplevel (widget);
- if (GTK_WIDGET_TOPLEVEL (toplevel) && toplevel->window) {
+ if (GTK_WIDGET_TOPLEVEL (toplevel) && gtk_widget_get_window (GTK_WIDGET (toplevel))) {
switch (cursor) {
case E_CURSOR_NORMAL :
@@ -61,7 +61,7 @@ void e_cursor_set (GtkWidget *widget, ECursorType cursor)
window_cursor = gdk_cursor_new (GDK_LEFT_PTR);
}
- gdk_window_set_cursor (toplevel->window, window_cursor);
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (toplevel)), window_cursor);
gdk_cursor_unref (window_cursor);
}
diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c
index a3bde484d5..0546430512 100644
--- a/e-util/e-dialog-utils.c
+++ b/e-util/e-dialog-utils.c
@@ -178,8 +178,8 @@ e_dialog_set_transient_for (GtkWindow *dialog,
}
#ifdef GDK_WINDOWING_X11
/* Find the top-level windowmanager-managed X Window */
- display = GDK_WINDOW_XDISPLAY (parent_widget->window);
- parent = GDK_WINDOW_XID (parent_widget->window);
+ display = GDK_WINDOW_XDISPLAY (gtk_widget_get_window (parent_widget));
+ parent = GDK_WINDOW_XID (gtk_widget_get_window (parent_widget));
while (parent && !window_is_wm_toplevel (display, parent)) {
status = XQueryTree (display, parent, &root_ret,
@@ -228,7 +228,7 @@ e_dialog_set_transient_for_xid (GtkWindow *dialog,
}
#ifdef GDK_MULTIHEAD_SAFE
- display = gdk_drawable_get_display (GDK_DRAWABLE (GTK_WIDGET (dialog)->window));
+ display = gdk_drawable_get_display (GDK_DRAWABLE (gtk_widget_get_window (GTK_WIDGET (dialog))));
parent = gdk_window_lookup_for_display (display, xid);
if (!parent)
parent = gdk_window_foreign_new_for_display (display, xid);
@@ -239,7 +239,7 @@ e_dialog_set_transient_for_xid (GtkWindow *dialog,
#endif
g_return_if_fail (parent != NULL);
- gdk_window_set_transient_for (GTK_WIDGET (dialog)->window, parent);
+ gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (dialog)), parent);
}
diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c
index d3987b07bc..afe50a85b4 100644
--- a/e-util/e-dialog-widgets.c
+++ b/e-util/e-dialog-widgets.c
@@ -139,34 +139,6 @@ get_radio_value (GtkRadioButton *radio, gpointer value_var, gpointer info)
*value = e_dialog_radio_get (GTK_WIDGET (radio), value_map);
}
-/* Hooks an option menu */
-static void
-hook_option_menu (GtkWidget *dialog, GtkOptionMenu *omenu, gpointer value_var, gpointer info)
-{
- const int *value_map;
- int *value;
-
- /* Set the value */
-
- value = (int *) value_var;
- value_map = (const int *) info;
-
- e_dialog_option_menu_set (GTK_WIDGET (omenu), *value, value_map);
-}
-
-/* Gets the value of an option menu */
-static void
-get_option_menu_value (GtkOptionMenu *omenu, gpointer value_var, gpointer info)
-{
- const int *value_map;
- int *value;
-
- value = (int *) value_var;
- value_map = (const int *) info;
-
- *value = e_dialog_option_menu_get (GTK_WIDGET (omenu), value_map);
-}
-
/* Hooks a toggle button */
static void
hook_toggle (GtkWidget *dialog, GtkToggleButton *toggle, gpointer value_var, gpointer info)
@@ -470,83 +442,6 @@ e_dialog_spin_get_int (GtkWidget *widget)
}
/**
- * e_dialog_option_menu_set:
- * @widget: A #GtkOptionMenu.
- * @value: Enumerated value.
- * @value_map: Map from enumeration values to array indices.
- *
- * Sets the selected item in a #GtkOptionMenu. Please read the description of
- * e_dialog_radio_set() to see how @value_map maps enumeration values to item
- * indices.
- **/
-void
-e_dialog_option_menu_set (GtkWidget *widget, int value, const int *value_map)
-{
- int i;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_OPTION_MENU (widget));
- g_return_if_fail (value_map != NULL);
-
- i = value_to_index (value_map, value);
-
- if (i != -1)
- gtk_option_menu_set_history (GTK_OPTION_MENU (widget), i);
- else
- g_message ("e_dialog_option_menu_set(): could not find value %d in value map!",
- value);
-}
-
-/**
- * e_dialog_option_menu_get:
- * @widget: A #GtkOptionMenu.
- * @value_map: Map from enumeration values to array indices.
- *
- * Queries the selected item in a #GtkOptionMenu. Please read the description
- * of e_dialog_radio_set() to see how @value_map maps enumeration values to item
- * indices.
- *
- * Return value: Enumeration value which corresponds to the selected item in the
- * option menu.
- **/
-int
-e_dialog_option_menu_get (GtkWidget *widget, const int *value_map)
-{
- GtkMenu *menu;
- GtkWidget *active;
- GList *children;
- GList *l;
- int i;
- int v;
-
- g_return_val_if_fail (widget != NULL, -1);
- g_return_val_if_fail (GTK_IS_OPTION_MENU (widget), -1);
- g_return_val_if_fail (value_map != NULL, -1);
-
- menu = GTK_MENU (gtk_option_menu_get_menu (GTK_OPTION_MENU (widget)));
-
- active = gtk_menu_get_active (menu);
- g_return_val_if_fail (active != NULL, -1);
-
- children = GTK_MENU_SHELL (menu)->children;
-
- for (i = 0, l = children; l; l = l->next, i++) {
- if (GTK_WIDGET (l->data) == active)
- break;
- }
-
- g_return_val_if_fail (l != NULL, -1);
-
- v = index_to_value (value_map, i);
- if (v == -1) {
- g_message ("e_dialog_option_menu_get(): could not find index %d in value map!", i);
- return -1;
- }
-
- return v;
-}
-
-/**
* e_dialog_combo_box_set:
* @widget: A #GtkComboBox.
* @value: Enumerated value.
@@ -681,8 +576,6 @@ e_dialog_widget_hook_value (GtkWidget *dialog, GtkWidget *widget,
if (GTK_IS_RADIO_BUTTON (widget))
hook_radio (dialog, GTK_RADIO_BUTTON (widget), value_var, info);
- else if (GTK_IS_OPTION_MENU (widget))
- hook_option_menu (dialog, GTK_OPTION_MENU (widget), value_var, info);
else if (GTK_IS_TOGGLE_BUTTON (widget))
hook_toggle (dialog, GTK_TOGGLE_BUTTON (widget), value_var, info);
else if (GTK_IS_SPIN_BUTTON (widget))
@@ -729,8 +622,6 @@ e_dialog_get_values (GtkWidget *dialog)
if (GTK_IS_RADIO_BUTTON (wh->widget))
get_radio_value (GTK_RADIO_BUTTON (wh->widget), wh->value_var, wh->info);
- else if (GTK_IS_OPTION_MENU (wh->widget))
- get_option_menu_value (GTK_OPTION_MENU (wh->widget), wh->value_var, wh->info);
else if (GTK_IS_TOGGLE_BUTTON (wh->widget))
get_toggle_value (GTK_TOGGLE_BUTTON (wh->widget), wh->value_var, wh->info);
else if (GTK_IS_SPIN_BUTTON (wh->widget))
diff --git a/e-util/e-dialog-widgets.h b/e-util/e-dialog-widgets.h
index 39f4b47b39..1a46c02fd3 100644
--- a/e-util/e-dialog-widgets.h
+++ b/e-util/e-dialog-widgets.h
@@ -43,9 +43,6 @@ void e_dialog_spin_set (GtkWidget *widget, double value);
double e_dialog_spin_get_double (GtkWidget *widget);
int e_dialog_spin_get_int (GtkWidget *widget);
-void e_dialog_option_menu_set (GtkWidget *widget, int value, const int *value_map);
-int e_dialog_option_menu_get (GtkWidget *widget, const int *value_map);
-
void e_dialog_combo_box_set (GtkWidget *widget, int value, const int *value_map);
int e_dialog_combo_box_get (GtkWidget *widget, const int *value_map);