diff options
-rw-r--r-- | calendar/gui/dialogs/alarm-dialog.c | 72 | ||||
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.c | 30 | ||||
-rw-r--r-- | calendar/gui/dialogs/recurrence-page.c | 28 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-details-page.c | 30 | ||||
-rw-r--r-- | e-util/e-dialog-utils.c | 169 | ||||
-rw-r--r-- | e-util/e-dialog-utils.h | 9 | ||||
-rw-r--r-- | e-util/e-dialog-widgets.c | 476 | ||||
-rw-r--r-- | e-util/e-dialog-widgets.h | 25 | ||||
-rw-r--r-- | mail/em-utils.c | 4 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-delegates-user.c | 2 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-delegates.c | 4 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-folder-size-display.c | 2 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-user-dialog.c | 2 |
13 files changed, 117 insertions, 736 deletions
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index 5ac97f7a13..d72ad46759 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -175,7 +175,8 @@ clear_widgets (Dialog *dialog) { /* Sane defaults */ e_dialog_combo_box_set (dialog->action_combo, E_CAL_COMPONENT_ALARM_DISPLAY, action_map); - e_dialog_spin_set (dialog->interval_value, 15); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (dialog->interval_value), 15); e_dialog_combo_box_set (dialog->value_units_combo, MINUTES, value_map); e_dialog_combo_box_set (dialog->relative_combo, BEFORE, relative_map); e_dialog_combo_box_set (dialog->time_combo, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map); @@ -253,24 +254,33 @@ alarm_to_repeat_widgets (Dialog *dialog, ECalComponentAlarm *alarm) e_cal_component_alarm_get_repeat (dialog->alarm, &repeat); if ( repeat.repetitions ) { - e_dialog_toggle_set (dialog->repeat_toggle, TRUE); - e_dialog_spin_set (dialog->repeat_quantity, repeat.repetitions); + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON (dialog->repeat_toggle), TRUE); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (dialog->repeat_quantity), + repeat.repetitions); } else return; if ( repeat.duration.minutes ) { e_dialog_combo_box_set (dialog->repeat_unit_combo, DUR_MINUTES, duration_units_map); - e_dialog_spin_set (dialog->repeat_value, repeat.duration.minutes); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (dialog->repeat_value), + repeat.duration.minutes); } if ( repeat.duration.hours ) { e_dialog_combo_box_set (dialog->repeat_unit_combo, DUR_HOURS, duration_units_map); - e_dialog_spin_set (dialog->repeat_value, repeat.duration.hours); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (dialog->repeat_value), + repeat.duration.hours); } if ( repeat.duration.days ) { e_dialog_combo_box_set (dialog->repeat_unit_combo, DUR_DAYS, duration_units_map); - e_dialog_spin_set (dialog->repeat_value, repeat.duration.days); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (dialog->repeat_value), + repeat.duration.days); } } @@ -279,27 +289,31 @@ repeat_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) { ECalComponentAlarmRepeat repeat; - if (!e_dialog_toggle_get (dialog->repeat_toggle)) { + if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->repeat_toggle))) { repeat.repetitions = 0; e_cal_component_alarm_set_repeat (alarm, repeat); return; } - repeat.repetitions = e_dialog_spin_get_int (dialog->repeat_quantity); + repeat.repetitions = gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (dialog->repeat_quantity)); memset (&repeat.duration, 0, sizeof (repeat.duration)); switch (e_dialog_combo_box_get (dialog->repeat_unit_combo, duration_units_map)) { case DUR_MINUTES: - repeat.duration.minutes = e_dialog_spin_get_int (dialog->repeat_value); + repeat.duration.minutes = gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (dialog->repeat_value)); break; case DUR_HOURS: - repeat.duration.hours = e_dialog_spin_get_int (dialog->repeat_value); + repeat.duration.hours = gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (dialog->repeat_value)); break; case DUR_DAYS: - repeat.duration.days = e_dialog_spin_get_int (dialog->repeat_value); + repeat.duration.days = gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (dialog->repeat_value)); break; default: @@ -343,7 +357,8 @@ alarm_to_aalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm) if ( !(url && *url) ) return; - e_dialog_toggle_set (dialog->aalarm_sound, TRUE); + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON (dialog->aalarm_sound), TRUE); gtk_file_chooser_set_uri ( GTK_FILE_CHOOSER (dialog->aalarm_file_chooser), url); } @@ -358,7 +373,8 @@ alarm_to_dalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm ) e_cal_component_alarm_get_description (alarm, &description); if (description.value) { - e_dialog_toggle_set (dialog->dalarm_message, TRUE); + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON (dialog->dalarm_message), TRUE); text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->dalarm_description)); gtk_text_buffer_set_text (text_buffer, description.value, -1); } @@ -635,16 +651,23 @@ populate_widgets_from_alarm (Dialog *dialog) if ( trigger->u.rel_duration.days ) { e_dialog_combo_box_set (dialog->value_units_combo, DAYS, value_map); - e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.days); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (dialog->interval_value), + trigger->u.rel_duration.days); } else if ( trigger->u.rel_duration.hours ) { e_dialog_combo_box_set (dialog->value_units_combo, HOURS, value_map); - e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.hours); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (dialog->interval_value), + trigger->u.rel_duration.hours); } else if ( trigger->u.rel_duration.minutes ) { e_dialog_combo_box_set (dialog->value_units_combo, MINUTES, value_map); - e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.minutes); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (dialog->interval_value), + trigger->u.rel_duration.minutes); } else { e_dialog_combo_box_set (dialog->value_units_combo, MINUTES, value_map); - e_dialog_spin_set (dialog->interval_value, 0); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (dialog->interval_value), 0); } /* Repeat options */ @@ -693,17 +716,20 @@ dialog_to_alarm (Dialog *dialog) switch (e_dialog_combo_box_get (dialog->value_units_combo, value_map)) { case MINUTES: trigger.u.rel_duration.minutes = - e_dialog_spin_get_int (dialog->interval_value); + gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (dialog->interval_value)); break; case HOURS: trigger.u.rel_duration.hours = - e_dialog_spin_get_int (dialog->interval_value); + gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (dialog->interval_value)); break; case DAYS: trigger.u.rel_duration.days = - e_dialog_spin_get_int (dialog->interval_value); + gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (dialog->interval_value)); break; default: @@ -956,7 +982,7 @@ check_custom_sound (Dialog *dialog) } } - sens = e_dialog_toggle_get (dialog->aalarm_sound) ? str && *str : TRUE; + sens = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->aalarm_sound)) ? str && *str : TRUE; gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, sens); g_free (str); @@ -995,7 +1021,7 @@ check_custom_message (Dialog *dialog) gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end); str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE); - sens = e_dialog_toggle_get (dialog->dalarm_message) ? str && *str : TRUE; + sens = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->dalarm_message)) ? str && *str : TRUE; gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, sens); g_free (str); @@ -1061,7 +1087,7 @@ check_custom_email (Dialog *dialog) gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end); str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE); - sens = (destinations != NULL) && (e_dialog_toggle_get (dialog->malarm_message) ? str && *str : TRUE); + sens = (destinations != NULL) && (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->malarm_message)) ? str && *str : TRUE); gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, sens); g_list_free (destinations); diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index d9bf73d5bf..e6023f94ed 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -271,7 +271,9 @@ hide_completed_tasks_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *pref static void hide_completed_tasks_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) { - calendar_config_set_hide_completed_tasks_value (e_dialog_spin_get_int (prefs->tasks_hide_completed_interval)); + calendar_config_set_hide_completed_tasks_value ( + gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (prefs->tasks_hide_completed_interval))); } static void @@ -450,14 +452,18 @@ show_task_list_config (CalendarPrefsDialog *prefs) /* Hide Completed Tasks. */ hide_completed_tasks = calendar_config_get_hide_completed_tasks (); - e_dialog_toggle_set (prefs->tasks_hide_completed, hide_completed_tasks); + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON (prefs->tasks_hide_completed), + hide_completed_tasks); /* Hide Completed Tasks Units. */ units = calendar_config_get_hide_completed_tasks_units (); e_dialog_combo_box_set (prefs->tasks_hide_completed_units, units, hide_completed_units_map); /* Hide Completed Tasks Value. */ - e_dialog_spin_set (prefs->tasks_hide_completed_interval, calendar_config_get_hide_completed_tasks_value ()); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (prefs->tasks_hide_completed_interval), + calendar_config_get_hide_completed_tasks_value ()); gtk_widget_set_sensitive (prefs->tasks_hide_completed_interval, hide_completed_tasks); gtk_widget_set_sensitive (prefs->tasks_hide_completed_units, hide_completed_tasks); @@ -527,7 +533,9 @@ show_config (CalendarPrefsDialog *prefs) e_dialog_combo_box_set (prefs->time_divisions, time_divisions, time_division_map); /* Month View - Scroll by a week */ - e_dialog_toggle_set (prefs->month_scroll_by_week, calendar_config_get_month_scroll_by_week ()); + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON (prefs->month_scroll_by_week), + calendar_config_get_month_scroll_by_week ()); /* Task list */ show_task_list_config (prefs); @@ -536,15 +544,21 @@ show_config (CalendarPrefsDialog *prefs) show_alarms_config (prefs); /* Other page */ - e_dialog_toggle_set (prefs->default_reminder, calendar_config_get_use_default_reminder ()); - e_dialog_spin_set (prefs->default_reminder_interval, calendar_config_get_default_reminder_interval ()); + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON (prefs->default_reminder), + calendar_config_get_use_default_reminder ()); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (prefs->default_reminder_interval), + calendar_config_get_default_reminder_interval ()); e_dialog_combo_box_set (prefs->default_reminder_units, calendar_config_get_default_reminder_units (), default_reminder_units_map); /* Birthdays & Anniversaries reminder */ set = calendar_config_get_ba_reminder (&interval, &units); - e_dialog_toggle_set (prefs->ba_reminder, set); - e_dialog_spin_set (prefs->ba_reminder_interval, interval); + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON (prefs->ba_reminder), set); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (prefs->ba_reminder_interval), interval); e_dialog_combo_box_set (prefs->ba_reminder_units, units, default_reminder_units_map); } diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index 933924ba96..b2c5cf3e21 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -418,12 +418,13 @@ clear_widgets (RecurrencePage *rpage) priv->month_day = MONTH_DAY_NTH; g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_toggle_set (priv->recurs, FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->recurs), FALSE); g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->interval_value)); g_signal_handlers_block_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_spin_set (priv->interval_value, 1); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (priv->interval_value), 1); g_signal_handlers_unblock_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); @@ -539,7 +540,7 @@ sensitize_recur_widgets (RecurrencePage *rpage) if (flags & COMP_EDITOR_MEETING) sens = flags & COMP_EDITOR_USER_ORG; - recurs = e_dialog_toggle_get (priv->recurs); + recurs = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->recurs)); /* We can't preview that well for instances right now */ if (e_cal_component_is_instance (priv->comp)) @@ -664,7 +665,8 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp) /* Frequency, interval, week start */ r.freq = e_dialog_combo_box_get (priv->interval_unit_combo, freq_map); - r.interval = e_dialog_spin_get_int (priv->interval_value); + r.interval = gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (priv->interval_value)); r.week_start = ICAL_SUNDAY_WEEKDAY + calendar_config_get_week_start_day (); @@ -801,7 +803,8 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp) g_return_if_fail (priv->ending_count_spin != NULL); g_return_if_fail (GTK_IS_SPIN_BUTTON (priv->ending_count_spin)); - r.count = e_dialog_spin_get_int (priv->ending_count_spin); + r.count = gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (priv->ending_count_spin)); break; case ENDING_UNTIL: @@ -852,7 +855,7 @@ fill_component (RecurrencePage *rpage, ECalComponent *comp) priv = rpage->priv; model = GTK_TREE_MODEL (priv->exception_list_store); - recurs = e_dialog_toggle_get (priv->recurs); + recurs = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->recurs)); if (recurs && priv->custom) { /* We just keep whatever the component has currently */ @@ -1413,7 +1416,9 @@ make_ending_count_special (RecurrencePage *rpage) /* Set the values */ - e_dialog_spin_set (priv->ending_count_spin, priv->ending_count); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (priv->ending_count_spin), + priv->ending_count); g_signal_connect_swapped ( adj, "value-changed", @@ -1598,7 +1603,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) && !e_cal_component_has_rrules (comp) && !e_cal_component_has_exrules (comp)) { g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_toggle_set (priv->recurs, FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->recurs), FALSE); g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); sensitize_buttons (rpage); @@ -1856,7 +1861,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) /* If we got here it means it is a simple recurrence */ g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_toggle_set (priv->recurs, TRUE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->recurs), TRUE); g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); sensitize_buttons (rpage); @@ -1864,7 +1869,8 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->interval_value)); g_signal_handlers_block_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); - e_dialog_spin_set (priv->interval_value, r->interval); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (priv->interval_value), r->interval); g_signal_handlers_unblock_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); fill_ending_date (rpage, r); @@ -1875,7 +1881,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); priv->custom = TRUE; - e_dialog_toggle_set (priv->recurs, TRUE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->recurs), TRUE); g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); /* FIXME Desensitize recurrence page */ diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 38faa99c0b..37a4b50627 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -269,10 +269,12 @@ task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) /* Percent Complete. */ e_cal_component_get_percent (comp, &percent); if (percent) { - e_dialog_spin_set (priv->percent_complete, *percent); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (priv->percent_complete), *percent); } else { /* FIXME: Could check if task is completed and set 100%. */ - e_dialog_spin_set (priv->percent_complete, 0); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (priv->percent_complete), 0); } /* Status. */ @@ -353,7 +355,8 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp) priv = tdpage->priv; /* Percent Complete. */ - percent = e_dialog_spin_get_int (priv->percent_complete); + percent = gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (priv->percent_complete)); e_cal_component_set_percent (comp, &percent); /* Status. */ @@ -547,7 +550,8 @@ date_changed_cb (EDateEdit *dedit, e_dialog_combo_box_set (priv->status_combo, ICAL_STATUS_NONE, status_map); - e_dialog_spin_set (priv->percent_complete, 0); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (priv->percent_complete), 0); } } else { if (status != ICAL_STATUS_COMPLETED) { @@ -555,7 +559,8 @@ date_changed_cb (EDateEdit *dedit, ICAL_STATUS_COMPLETED, status_map); } - e_dialog_spin_set (priv->percent_complete, 100); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (priv->percent_complete), 100); } comp_editor_page_set_updating (COMP_EDITOR_PAGE (tdpage), FALSE); @@ -584,18 +589,22 @@ status_changed (GtkWidget *combo, TaskDetailsPage *tdpage) status = e_dialog_combo_box_get (priv->status_combo, status_map); if (status == ICAL_STATUS_NONE) { - e_dialog_spin_set (priv->percent_complete, 0); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (priv->percent_complete), 0); e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime); complete_date_changed (tdpage, 0, FALSE); } else if (status == ICAL_STATUS_INPROCESS) { - gint percent_complete = e_dialog_spin_get_int (priv->percent_complete); + gint percent_complete = gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (priv->percent_complete)); if (percent_complete <= 0 || percent_complete >= 100) - e_dialog_spin_set (priv->percent_complete, 50); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (priv->percent_complete), 50); e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime); complete_date_changed (tdpage, 0, FALSE); } else if (status == ICAL_STATUS_COMPLETED) { - e_dialog_spin_set (priv->percent_complete, 100); + gtk_spin_button_set_value ( + GTK_SPIN_BUTTON (priv->percent_complete), 100); ctime = time (NULL); e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime); complete_date_changed (tdpage, ctime, TRUE); @@ -625,7 +634,8 @@ percent_complete_changed (GtkAdjustment *adj, TaskDetailsPage *tdpage) comp_editor_page_set_updating (COMP_EDITOR_PAGE (tdpage), TRUE); - percent = e_dialog_spin_get_int (priv->percent_complete); + percent = gtk_spin_button_get_value_as_int ( + GTK_SPIN_BUTTON (priv->percent_complete)); if (percent == 100) { complete = TRUE; ctime = time (NULL); diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c index d02a42572b..14f12e2f4c 100644 --- a/e-util/e-dialog-utils.c +++ b/e-util/e-dialog-utils.c @@ -71,178 +71,11 @@ e_notice (gpointer parent, GtkMessageType type, const gchar *format, ...) g_free (str); if (parent) - e_dialog_set_transient_for (GTK_WINDOW (dialog), parent); + gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } -/** - * e_notice_with_xid: - * @parent: the dialog's parent window, or %NULL - * @type: the type of dialog (%GTK_MESSAGE_INFO, %GTK_MESSAGE_WARNING, - * or %GTK_MESSAGE_ERROR) - * @format: printf-style format string, followed by arguments - * - * Like e_notice(), but takes a GdkNativeWindow for the parent - * window argument. - **/ -void -e_notice_with_xid (GdkNativeWindow parent, GtkMessageType type, const gchar *format, ...) -{ - GtkWidget *dialog; - va_list args; - gchar *str; - - va_start (args, format); - str = g_strdup_vprintf (format, args); - dialog = gtk_message_dialog_new (NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, - type, - GTK_BUTTONS_OK, - "%s", - str); - gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); - va_end (args); - g_free (str); - - if (parent) - e_dialog_set_transient_for_xid (GTK_WINDOW (dialog), parent); - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); -} - - -#ifdef GDK_WINDOWING_X11 -/* Tests whether or not an X Window is being managed by the - * window manager. - */ -static gboolean -window_is_wm_toplevel (Display *display, Window window) -{ - static Atom WM_STATE = None; - unsigned long nitems, after; - guchar *data = NULL; - Atom type = None; - gint format; - - if (!WM_STATE) - WM_STATE = XInternAtom (display, "WM_STATE", False); - - if (XGetWindowProperty (display, window, WM_STATE, 0, 0, False, - AnyPropertyType, &type, &format, - &nitems, &after, &data) == Success) { - if (data) - XFree((gchar *)data); - if (type) - return TRUE; - } - return FALSE; -} - -#endif - -/** - * e_dialog_set_transient_for: - * @dialog: a dialog window - * @parent_widget: the parent for @dialog - * - * This sets the parent for @dialog to be @parent_widget. Unlike - * gtk_window_set_transient_for (), this doesn't need @parent_widget to - * be the actual toplevel, and also works if @parent_widget is - * embedded as a Bonobo control by an out-of-process container. - * @parent_widget must already be realized before calling this - * function, but @dialog does not need to be. - **/ -void -e_dialog_set_transient_for (GtkWindow *dialog, - GtkWidget *parent_widget) -{ - GtkWidget *toplevel; -#ifdef GDK_WINDOWING_X11 - Window parent, root_ret, *children; - guint numchildren; - Display *display; - Status status; -#endif - g_return_if_fail (GTK_IS_WINDOW (dialog)); - g_return_if_fail (GTK_IS_WIDGET (parent_widget)); - - toplevel = gtk_widget_get_toplevel (parent_widget); - if (toplevel == NULL) - return; - - if (!GTK_IS_PLUG (toplevel)) { - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (toplevel)); - return; - } -#ifdef GDK_WINDOWING_X11 - /* Find the top-level windowmanager-managed X 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, - &parent, &children, &numchildren); - if (status != 0) - XFree (children); - } - - e_dialog_set_transient_for_xid (dialog, parent); -#endif -#ifdef GDK_WINDOWING_WIN32 - g_warning ("Not implemented on Win32: e_dialog_set_transient_for () for plug windows"); -#endif -} - -static void -dialog_realized (GtkWindow *dialog, gpointer xid) -{ - e_dialog_set_transient_for_xid (dialog, (GdkNativeWindow)GPOINTER_TO_INT(xid)); -} - -/** - * e_dialog_set_transient_for_xid: - * @dialog: a dialog window - * @xid: the X Window parent - * - * Like e_dialog_set_transient_for (), but use an XID to specify the - * parent window. - **/ -void -e_dialog_set_transient_for_xid (GtkWindow *dialog, - GdkNativeWindow xid) -{ -#ifdef GDK_MULTIHEAD_SAFE - GdkDisplay *display; -#endif - GdkWindow *parent; - - g_return_if_fail (GTK_IS_WINDOW (dialog)); - - if (!GTK_WIDGET_REALIZED (dialog)) { - g_signal_connect (dialog, "realize", - G_CALLBACK (dialog_realized), - GINT_TO_POINTER(xid)); - return; - } - -#ifdef GDK_MULTIHEAD_SAFE - 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); -#else - parent = gdk_window_lookup (xid); - if (!parent) - parent = gdk_window_foreign_new (xid); -#endif - g_return_if_fail (parent != NULL); - - gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (dialog)), parent); -} - - static void save_ok (GtkWidget *widget, gpointer data) { diff --git a/e-util/e-dialog-utils.h b/e-util/e-dialog-utils.h index 98d85e151d..ba0683bbe9 100644 --- a/e-util/e-dialog-utils.h +++ b/e-util/e-dialog-utils.h @@ -29,15 +29,6 @@ void e_notice (gpointer parent, GtkMessageType type, const gchar *format, ...); -void e_notice_with_xid (GdkNativeWindow parent, - GtkMessageType type, - const gchar *format, - ...); - -void e_dialog_set_transient_for (GtkWindow *dialog, - GtkWidget *parent_widget); -void e_dialog_set_transient_for_xid (GtkWindow *dialog, - GdkNativeWindow xid); gchar *e_file_dialog_save (const gchar *title, const gchar *fname); diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c index cdcd52dd26..a847960eb2 100644 --- a/e-util/e-dialog-widgets.c +++ b/e-util/e-dialog-widgets.c @@ -31,51 +31,6 @@ #include "e-dialog-widgets.h" - - -/* A widget, a pointer to the variable it will modify, and extra information */ -typedef struct { - GtkWidget *widget; - gpointer value_var; - gpointer info; -} WidgetHook; - -/* Hook information for a complete dialog */ -typedef struct { - GSList *whooks; -} DialogHooks; - - - -/* Destroy handler for the dialog; frees the dialog hooks */ -static void -dialog_destroy_cb (DialogHooks *hooks, GObject *dialog) -{ - g_slist_free (hooks->whooks); - hooks->whooks = NULL; - - g_free (hooks); - g_object_set_data (dialog, "dialog-hooks", NULL); -} - -/* Ensures that the dialog has the necessary attached data to store the widget - * hook information. - */ -static DialogHooks * -get_dialog_hooks (GtkWidget *dialog) -{ - DialogHooks *hooks; - - hooks = g_object_get_data ((GObject *) dialog, "dialog-hooks"); - if (!hooks) { - hooks = g_new0 (DialogHooks, 1); - g_object_set_data ((GObject *) dialog, "dialog-hooks", hooks); - g_object_weak_ref ((GObject *) dialog, (GWeakNotify) dialog_destroy_cb, hooks); - } - - return hooks; -} - /* Converts an mapped value to the appropriate index in an item group. The * values for the items are provided as a -1-terminated array. */ @@ -110,109 +65,6 @@ index_to_value (const gint *value_map, gint index) return -1; } -/* Hooks a radio button group */ -static void -hook_radio (GtkWidget *dialog, GtkRadioButton *radio, gpointer value_var, gpointer info) -{ - const gint *value_map; - gint *value; - - /* Set the value */ - - value = (gint *) value_var; - value_map = (const gint *) info; - - e_dialog_radio_set (GTK_WIDGET (radio), *value, value_map); -} - -/* Gets the value of a radio button group */ -static void -get_radio_value (GtkRadioButton *radio, gpointer value_var, gpointer info) -{ - gint *value; - const gint *value_map; - - value = (gint *) value_var; - value_map = (const gint *) info; - - *value = e_dialog_radio_get (GTK_WIDGET (radio), value_map); -} - -/* Hooks a toggle button */ -static void -hook_toggle (GtkWidget *dialog, GtkToggleButton *toggle, gpointer value_var, gpointer info) -{ - gboolean *value; - - /* Set the value */ - - value = (gboolean *) value_var; - e_dialog_toggle_set (GTK_WIDGET (toggle), *value); -} - -/* Gets the value of a toggle button */ -static void -get_toggle_value (GtkToggleButton *toggle, gpointer value_var, gpointer info) -{ - gboolean *value; - - value = (gboolean *) value_var; - *value = e_dialog_toggle_get (GTK_WIDGET (toggle)); -} - -/* Hooks a spin button */ -static void -hook_spin_button (GtkWidget *dialog, GtkSpinButton *spin, gpointer value_var, gpointer info) -{ - double *value; - GtkAdjustment *adj; - - /* Set the value */ - - value = (double *) value_var; - e_dialog_spin_set (GTK_WIDGET (spin), *value); - - /* Hook to changed */ - - adj = gtk_spin_button_get_adjustment (spin); -} - -/* Gets the value of a spin button */ -static void -get_spin_button_value (GtkSpinButton *spin, gpointer value_var, gpointer info) -{ - double *value; - - value = (double *) value_var; - *value = e_dialog_spin_get_double (GTK_WIDGET (spin)); -} - -/* Hooks a GtkEditable widget */ -static void -hook_editable (GtkWidget *dialog, GtkEditable *editable, gpointer value_var, gpointer info) -{ - gchar **value; - - /* Set the value */ - - value = (gchar **) value_var; - - e_dialog_editable_set (GTK_WIDGET (editable), *value); -} - -/* Gets the value of a GtkEditable widget */ -static void -get_editable_value (GtkEditable *editable, gpointer value_var, gpointer data) -{ - gchar **value; - - value = (gchar **) value_var; - if (*value) - g_free (*value); - - *value = e_dialog_editable_get (GTK_WIDGET (editable)); -} - /** * e_dialog_editable_set: * @widget: A #GtkEditable widget. @@ -254,195 +106,6 @@ e_dialog_editable_get (GtkWidget *widget) } /** - * e_dialog_radio_set: - * @widget: A #GtkRadioButton in a radio button group. - * @value: Enumerated value. - * @value_map: Map from enumeration values to array indices. - * - * Sets the selected item in a radio group. The specified @widget can be any of - * the #GtkRadioButtons in the group. Each radio button should correspond to an - * enumeration value; the specified @value will be mapped to an integer from - * zero to the number of items in the group minus 1 by using a mapping table - * specified in @value_map. The last element in this table should be -1. Thus - * a table to map three possible interpolation values to integers could be - * specified as { NEAREST_NEIGHBOR, BILINEAR, HYPERBOLIC, -1 }. - **/ -void -e_dialog_radio_set (GtkWidget *widget, gint value, const gint *value_map) -{ - GSList *group, *l; - gint i; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_RADIO_BUTTON (widget)); - g_return_if_fail (value_map != NULL); - - group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget)); - - i = value_to_index (value_map, value); - if (i != -1) { - /* Groups are built by prepending items, so the list ends up in reverse - * order; we need to flip the index around. - */ - i = g_slist_length (group) - i - 1; - - l = g_slist_nth (group, i); - if (!l) - g_message ("e_dialog_radio_set(): could not find index %d in radio group!", i); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (l->data), TRUE); - } else - g_message ("e_dialog_radio_set(): could not find value %d in value map!", value); -} - -/** - * e_dialog_radio_get: - * @widget: A #GtkRadioButton in a radio button group. - * @value_map: Map from enumeration values to array indices. - * - * Queries the selected item in a #GtkRadioButton group. Please read the - * description of e_dialog_radio_set() to see how @value_map maps enumeration - * values to button indices. - * - * Return value: Enumeration value which corresponds to the selected item in the - * radio group. - **/ -gint -e_dialog_radio_get (GtkWidget *widget, const gint *value_map) -{ - GSList *group, *l; - gint i, v; - - g_return_val_if_fail (widget != NULL, -1); - g_return_val_if_fail (GTK_IS_RADIO_BUTTON (widget), -1); - g_return_val_if_fail (value_map != NULL, -1); - - group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget)); - - for (i = 0, l = group; l; l = l->next, i++) { - GtkToggleButton *toggle_button; - - toggle_button = GTK_TOGGLE_BUTTON (l->data); - - if (gtk_toggle_button_get_active (toggle_button)) - break; - } - - g_return_val_if_fail (l != NULL, -1); - - /* Groups are built by prepending items, so the list ends up in reverse - * order; we need to flip the index around. - */ - i = g_slist_length (group) - i - 1; - - v = index_to_value (value_map, i); - if (v == -1) { - g_message ("e_dialog_radio_get(): could not find index %d in value map!", i); - return -1; - } - - return v; -} - -/** - * e_dialog_toggle_set: - * @widget: A #GtkToggleButton. - * @value: Toggle value. - * - * Sets the value of a #GtkToggleButton-derived widget. This should not be used - * for radio buttons; it is more convenient to use use e_dialog_radio_set() - * instead. - **/ -void -e_dialog_toggle_set (GtkWidget *widget, gboolean value) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TOGGLE_BUTTON (widget)); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value); -} - -/** - * e_dialog_toggle_get: - * @widget: A #GtkToggleButton. - * - * Queries the value of a #GtkToggleButton-derived widget. This should not be - * used for radio buttons; it is more convenient to use e_dialog_radio_get() - * instead. - * - * Return value: Toggle value. - **/ -gboolean -e_dialog_toggle_get (GtkWidget *widget) -{ - g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (widget), FALSE); - - return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); -} - -/** - * e_dialog_spin_set: - * @widget: A #GtkSpinButton. - * @value: Numeric value. - * - * Sets the value of a #GtkSpinButton widget. - **/ -void -e_dialog_spin_set (GtkWidget *widget, double value) -{ - GtkAdjustment *adj; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_SPIN_BUTTON (widget)); - - adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget)); - - gtk_adjustment_set_value (adj, value); - g_signal_emit_by_name (adj, "value_changed", 0); -} - -/** - * e_dialog_spin_get_double: - * @widget: A #GtkSpinButton. - * - * Queries the floating-point value of a #GtkSpinButton widget. - * - * Return value: Numeric value. - **/ -gdouble -e_dialog_spin_get_double (GtkWidget *widget) -{ - GtkAdjustment *adj; - - g_return_val_if_fail (widget != NULL, 0.0); - g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), 0.0); - - adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget)); - - return gtk_adjustment_get_value (adj); -} - -/** - * e_dialog_spin_get_int: - * @widget: A #GtkSpinButton. - * - * Queries the integer value of a #GtkSpinButton widget. - * - * Return value: Numeric value. - **/ -gint -e_dialog_spin_get_int (GtkWidget *widget) -{ - double value; - - g_return_val_if_fail (widget != NULL, -1); - g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), -1); - - value = e_dialog_spin_get_double (widget); - return (gint) floor (value); -} - -/** * e_dialog_combo_box_set: * @widget: A #GtkComboBox. * @value: Enumerated value. @@ -498,142 +161,3 @@ e_dialog_combo_box_get (GtkWidget *widget, const gint *value_map) } return i; } - -/** - * e_dialog_widget_hook_value: - * @dialog: Dialog box in which the @widget lives in. - * @widget: A widget that will control a variable. - * @value_var: Pointer to the variable that the @widget will control. - * @info: NULL for most widgets, or an integer value map array (see - * e_dialog_radio_set() for details). - * - * Hooks a widget from a dialog box to the variable it will modify. Supported - * widgets are: #GtkEditable (gchar *), #GtkRadioButton (int/value_map pair; see - * e_dialog_radio_set() for more information), #GtkTogglebutton (gboolean), - * #GtkSpinButton (double), #GtkOptionMenu (int/value_map pair), and - * #GnomeDateEdit (time_t). - * - * A pointer to the appropriate variable to modify should be passed in @value_var. - * For values that take a value_map array as well, it should be passed in @info. - * - * The widgets within a dialog that are hooked with this function will set their - * respective variables only when e_dialog_get_values() is called. The typical - * use is to call that function in the handler for the "OK" button of a dialog - * box. - * - * Return value: TRUE if the type of the specified @widget is supported, FALSE - * otherwise. - **/ -gboolean -e_dialog_widget_hook_value (GtkWidget *dialog, GtkWidget *widget, - gpointer value_var, gpointer info) -{ - DialogHooks *hooks; - WidgetHook *wh; - - g_return_val_if_fail (dialog != NULL, FALSE); - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); - g_return_val_if_fail (value_var != NULL, FALSE); - - hooks = get_dialog_hooks (dialog); - - /* First check if it is a "group" widget, like a radio button or an - * option menu. Then we check for normal ungrouped widgets. - */ - - if (GTK_IS_RADIO_BUTTON (widget)) - hook_radio (dialog, GTK_RADIO_BUTTON (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)) - hook_spin_button (dialog, GTK_SPIN_BUTTON (widget), value_var, info); - else if (GTK_IS_EDITABLE (widget)) - hook_editable (dialog, GTK_EDITABLE (widget), value_var, info); - else - return FALSE; - - wh = g_new (WidgetHook, 1); - wh->widget = widget; - wh->value_var = value_var; - wh->info = info; - - hooks->whooks = g_slist_prepend (hooks->whooks, wh); - - return TRUE; -} - -/** - * e_dialog_get_values: - * @dialog: A dialog box whose widgets have been hooked to the appropriate - * variables with e_dialog_widget_hook_value(). - * - * Makes every widget in a @dialog that was hooked with - * e_dialog_widget_hook_value() apply its value to its corresponding variable. - * The typical usage is to call this function in the handler for the "OK" button - * of a dialog box. - **/ -void -e_dialog_get_values (GtkWidget *dialog) -{ - DialogHooks *hooks; - GSList *l; - - g_return_if_fail (dialog != NULL); - - hooks = get_dialog_hooks (dialog); - - for (l = hooks->whooks; l; l = l->next) { - WidgetHook *wh; - - wh = l->data; - - if (GTK_IS_RADIO_BUTTON (wh->widget)) - get_radio_value (GTK_RADIO_BUTTON (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)) - get_spin_button_value (GTK_SPIN_BUTTON (wh->widget), wh->value_var, wh->info); - else if (GTK_IS_EDITABLE (wh->widget)) - get_editable_value (GTK_EDITABLE (wh->widget), wh->value_var, wh->info); - else - g_return_if_reached (); - } -} - -/** - * e_dialog_xml_widget_hook_value: - * @xml: Glade XML description of a dialog box. - * @dialog: Dialog box in which the widget lives in. - * @widget_name: Name of the widget in the Glade XML data. - * @value_var: Pointer to the variable that the widget will control. - * @info: NULL for most widgets, or an integer value map array (see - * e_dialog_radio_set() for details). - * - * Similar to e_dialog_widget_hook_value(), but uses the widget from a #GladeXML - * data structure. - * - * Return value: TRUE if the type of the specified widget is supported, FALSE - * otherwise. - **/ -gboolean -e_dialog_xml_widget_hook_value (GladeXML *xml, GtkWidget *dialog, const gchar *widget_name, - gpointer value_var, gpointer info) -{ - GtkWidget *widget; - - g_return_val_if_fail (xml != NULL, FALSE); - g_return_val_if_fail (GLADE_IS_XML (xml), FALSE); - g_return_val_if_fail (dialog != NULL, FALSE); - g_return_val_if_fail (widget_name != NULL, FALSE); - g_return_val_if_fail (value_var != NULL, FALSE); - - widget = glade_xml_get_widget (xml, widget_name); - if (!widget) { - g_message ("e_dialog_xml_widget_hook_value(): could not find widget `%s' in " - "Glade data!", widget_name); - return FALSE; - } - - return e_dialog_widget_hook_value (dialog, widget, value_var, info); -} diff --git a/e-util/e-dialog-widgets.h b/e-util/e-dialog-widgets.h index ff4a9e0d0d..6e9f798db7 100644 --- a/e-util/e-dialog-widgets.h +++ b/e-util/e-dialog-widgets.h @@ -25,35 +25,10 @@ #ifndef E_DIALOG_WIDGETS_H #define E_DIALOG_WIDGETS_H -#include <time.h> -#include <glade/glade.h> - - - void e_dialog_editable_set (GtkWidget *widget, const gchar *value); gchar *e_dialog_editable_get (GtkWidget *widget); -void e_dialog_radio_set (GtkWidget *widget, gint value, const gint *value_map); -gint e_dialog_radio_get (GtkWidget *widget, const gint *value_map); - -void e_dialog_toggle_set (GtkWidget *widget, gboolean value); -gboolean e_dialog_toggle_get (GtkWidget *widget); - -void e_dialog_spin_set (GtkWidget *widget, double value); -gdouble e_dialog_spin_get_double (GtkWidget *widget); -gint e_dialog_spin_get_int (GtkWidget *widget); - void e_dialog_combo_box_set (GtkWidget *widget, gint value, const gint *value_map); gint e_dialog_combo_box_get (GtkWidget *widget, const gint *value_map); -gboolean e_dialog_widget_hook_value (GtkWidget *dialog, GtkWidget *widget, - gpointer value_var, gpointer info); - -void e_dialog_get_values (GtkWidget *dialog); - -gboolean e_dialog_xml_widget_hook_value (GladeXML *xml, GtkWidget *dialog, const gchar *widget_name, - gpointer value_var, gpointer info); - - - #endif diff --git a/mail/em-utils.c b/mail/em-utils.c index da0e3e2a57..0a55ea842d 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -302,7 +302,9 @@ em_utils_edit_filters (GtkWidget *parent) filter_editor = (GtkWidget *) em_filter_editor_new (fc, em_filter_source_element_names); if (parent != NULL) - e_dialog_set_transient_for ((GtkWindow *) filter_editor, parent); + gtk_window_set_transient_for ( + GTK_WINDOW (filter_editor), + GTK_WINDOW (parent)); gtk_window_set_title (GTK_WINDOW (filter_editor), _("Message Filters")); g_object_set_data_full ((GObject *) filter_editor, "context", fc, (GDestroyNotify) g_object_unref); diff --git a/plugins/exchange-operations/exchange-delegates-user.c b/plugins/exchange-operations/exchange-delegates-user.c index 191ed25fc8..555b0ee73b 100644 --- a/plugins/exchange-operations/exchange-delegates-user.c +++ b/plugins/exchange-operations/exchange-delegates-user.c @@ -226,7 +226,7 @@ exchange_delegates_user_edit (ExchangeAccount *account, dialog = glade_xml_get_widget (xml, "delegate_permissions"); gtk_window_set_title (GTK_WINDOW (dialog), title); - e_dialog_set_transient_for (GTK_WINDOW (dialog), parent_window); + gtk_window_set_transient_for (GTK_WINDOW (dialog), parent_window); g_free (title); table = glade_xml_get_widget (xml, "toplevel_table"); diff --git a/plugins/exchange-operations/exchange-delegates.c b/plugins/exchange-operations/exchange-delegates.c index 7b466ead07..dda48dfeb2 100644 --- a/plugins/exchange-operations/exchange-delegates.c +++ b/plugins/exchange-operations/exchange-delegates.c @@ -580,7 +580,7 @@ remove_button_clicked_cb (GtkWidget *widget, gpointer data) GTK_BUTTONS_YES_NO, _("Remove the delegate %s?"), user->display_name); - e_dialog_set_transient_for (GTK_WINDOW (dialog), widget); + gtk_window_set_transient_for (GTK_WINDOW (dialog), widget); btn = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); @@ -929,7 +929,7 @@ exchange_delegates (ExchangeAccount *account, GtkWidget *parent) g_signal_connect (delegates->dialog, "response", G_CALLBACK (dialog_response), delegates); - e_dialog_set_transient_for (GTK_WINDOW (delegates->dialog), parent); + gtk_window_set_transient_for (GTK_WINDOW (delegates->dialog), parent); delegates->parent = parent; g_object_weak_ref (G_OBJECT (parent), parent_destroyed, delegates); diff --git a/plugins/exchange-operations/exchange-folder-size-display.c b/plugins/exchange-operations/exchange-folder-size-display.c index 1a916a9f1b..8db56b80a2 100644 --- a/plugins/exchange-operations/exchange-folder-size-display.c +++ b/plugins/exchange-operations/exchange-folder-size-display.c @@ -119,7 +119,7 @@ exchange_folder_size_display (GtkListStore *model, GtkWidget *parent) table = glade_xml_get_widget (xml, "folder_treeview"); g_object_unref (xml); - e_dialog_set_transient_for (GTK_WINDOW (dialog), parent); + gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); /* fsize->parent = parent; */ /* Set up the table */ diff --git a/plugins/exchange-operations/exchange-user-dialog.c b/plugins/exchange-operations/exchange-user-dialog.c index eec2c7bddc..823226427d 100644 --- a/plugins/exchange-operations/exchange-user-dialog.c +++ b/plugins/exchange-operations/exchange-user-dialog.c @@ -134,7 +134,7 @@ e2k_user_dialog_construct (E2kUserDialog *dialog, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - e_dialog_set_transient_for (GTK_WINDOW (dialog), parent_window); + gtk_window_set_transient_for (GTK_WINDOW (dialog), parent_window); priv = dialog->priv; priv->section_name = g_strdup (section_name); |