Commit aedc0f5a authored by Javier Jardón Cabezas's avatar Javier Jardón Cabezas Committed by Paolo Borelli

Use gtk accessor functions instead direct access

First batch of Bug #593601. Some functions still remaining because there
is not API in GTK+ yet
parent 49ef7fd9
......@@ -196,7 +196,8 @@ gedit_close_confirmation_dialog_init (GeditCloseConfirmationDialog *dlg)
& GEDIT_LOCKDOWN_SAVE_TO_DISK;
gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 14);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
14);
gtk_window_set_resizable (GTK_WINDOW (dlg), FALSE);
gtk_dialog_set_has_separator (GTK_DIALOG (dlg), FALSE);
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dlg), TRUE);
......@@ -553,7 +554,7 @@ build_single_doc_dialog (GeditCloseConfirmationDialog *dlg)
gtk_box_pack_start (GTK_BOX (vbox), secondary_label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
hbox,
FALSE,
FALSE,
......@@ -676,7 +677,7 @@ build_multiple_docs_dialog (GeditCloseConfirmationDialog *dlg)
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
hbox, TRUE, TRUE, 0);
/* Image */
......
......@@ -324,9 +324,11 @@ gedit_encodings_dialog_init (GeditEncodingsDialog *dlg)
/* HIG defaults */
gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (dlg))),
5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dlg))), 6);
gtk_dialog_set_default_response (GTK_DIALOG (dlg),
GTK_RESPONSE_OK);
......@@ -352,14 +354,14 @@ gedit_encodings_dialog_init (GeditEncodingsDialog *dlg)
{
gtk_widget_show (error_widget);
gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start_defaults (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
error_widget);
gtk_container_set_border_width (GTK_CONTAINER (error_widget), 5);
return;
}
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
content, TRUE, TRUE, 0);
g_object_unref (content);
gtk_container_set_border_width (GTK_CONTAINER (content), 5);
......
......@@ -1091,9 +1091,9 @@ gedit_preferences_dialog_init (GeditPreferencesDialog *dlg)
/* HIG defaults */
gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (dlg))), 5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dlg))), 6);
g_signal_connect (dlg,
"response",
......@@ -1145,13 +1145,13 @@ gedit_preferences_dialog_init (GeditPreferencesDialog *dlg)
{
gtk_widget_show (error_widget);
gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start_defaults (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
error_widget);
return;
}
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
dlg->priv->notebook, FALSE, FALSE, 0);
g_object_unref (dlg->priv->notebook);
gtk_container_set_border_width (GTK_CONTAINER (dlg->priv->notebook), 5);
......
......@@ -338,9 +338,12 @@ gedit_search_dialog_init (GeditSearchDialog *dlg)
/* HIG defaults */
gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (dlg))),
5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dlg))),
6);
file = gedit_dirs_get_ui_file ("gedit-search-dialog.ui");
ret = gedit_utils_get_ui_objects (file,
......@@ -361,7 +364,7 @@ gedit_search_dialog_init (GeditSearchDialog *dlg)
{
gtk_widget_show (error_widget);
gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start_defaults (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
error_widget);
gtk_container_set_border_width (GTK_CONTAINER (error_widget),
5);
......@@ -439,7 +442,7 @@ gedit_search_dialog_init (GeditSearchDialog *dlg)
GEDIT_SEARCH_DIALOG_REPLACE_ALL_RESPONSE,
FALSE);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
content, FALSE, FALSE, 0);
g_object_unref (content);
gtk_container_set_border_width (GTK_CONTAINER (content), 5);
......
......@@ -173,7 +173,7 @@ add_or_remove (GtkMenuItem *menu_item,
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (toplevel));
wg = GTK_WINDOW (toplevel)->group;
wg = gtk_window_get_group (GTK_WINDOW (toplevel));
if (wg == NULL)
{
wg = gtk_window_group_new ();
......@@ -384,6 +384,7 @@ gedit_encodings_option_menu_set_selected_encoding (GeditEncodingsOptionMenu *men
{
GtkOptionMenu *option_menu;
GList *list;
GList *l;
gint i;
g_return_if_fail (GEDIT_IS_ENCODINGS_OPTION_MENU (menu));
......@@ -391,14 +392,14 @@ gedit_encodings_option_menu_set_selected_encoding (GeditEncodingsOptionMenu *men
option_menu = GTK_OPTION_MENU (menu);
g_return_if_fail (option_menu != NULL);
list = GTK_MENU_SHELL (option_menu->menu)->children;
list = gtk_container_get_children (GTK_CONTAINER (option_menu->menu));
i = 0;
while (list != NULL)
for (l = list; l != NULL; l = g_list_next (l))
{
GtkWidget *menu_item;
const GeditEncoding *enc;
menu_item = GTK_WIDGET (list->data);
menu_item = GTK_WIDGET (l->data);
enc = (const GeditEncoding *)g_object_get_data (G_OBJECT (menu_item),
ENCODING_KEY);
......@@ -406,14 +407,12 @@ gedit_encodings_option_menu_set_selected_encoding (GeditEncodingsOptionMenu *men
if (enc == encoding)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE);
gtk_option_menu_set_history (GTK_OPTION_MENU (menu), i);
return;
break;
}
++i;
list = g_list_next (list);
}
g_list_free (list);
}
......@@ -388,7 +388,7 @@ drag_start (GeditNotebook *notebook,
/* FIXME multi-head */
if (!gdk_pointer_is_grabbed ())
{
gdk_pointer_grab (GTK_WIDGET (notebook)->window,
gdk_pointer_grab (gtk_widget_get_window (GTK_WIDGET (notebook)),
FALSE,
GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
NULL,
......
......@@ -806,7 +806,7 @@ gedit_plugins_engine_configure_plugin (GeditPluginsEngine *engine,
gtk_window_set_transient_for (GTK_WINDOW (conf_dlg),
parent);
wg = parent->group;
wg = gtk_window_get_group (parent);
if (wg == NULL)
{
wg = gtk_window_group_new ();
......
......@@ -717,6 +717,7 @@ get_page_at_coords (GeditPrintPreview *preview,
gint y)
{
GeditPrintPreviewPrivate *priv;
GtkAdjustment *hadj, *vadj;
gint r, c, pg;
priv = preview->priv;
......@@ -724,8 +725,11 @@ get_page_at_coords (GeditPrintPreview *preview,
if (priv->tile_h <= 0 || priv->tile_h <= 0)
return -1;
x += gtk_layout_get_hadjustment (GTK_LAYOUT (priv->layout))->value;
y += gtk_layout_get_vadjustment (GTK_LAYOUT (priv->layout))->value;
hadj = gtk_layout_get_hadjustment (GTK_LAYOUT (priv->layout));
vadj = gtk_layout_get_vadjustment (GTK_LAYOUT (priv->layout));
x += gtk_adjustment_get_value (hadj);
y += gtk_adjustment_get_value (vadj);
r = 1 + y / (priv->tile_h);
c = 1 + x / (priv->tile_w);
......@@ -786,8 +790,8 @@ preview_layout_key_press (GtkWidget *widget,
hadj = gtk_layout_get_hadjustment (GTK_LAYOUT (priv->layout));
vadj = gtk_layout_get_vadjustment (GTK_LAYOUT (priv->layout));
x = hadj->value;
y = vadj->value;
x = gtk_adjustment_get_value (hadj);
y = gtk_adjustment_get_value (vadj);
g_object_get (hadj,
"lower", &hlower,
......@@ -1103,17 +1107,19 @@ preview_expose (GtkWidget *widget,
GdkEventExpose *event,
GeditPrintPreview *preview)
{
GeditPrintPreviewPrivate *priv;
GeditPrintPreviewPrivate *priv;
GdkWindow *bin_window;
cairo_t *cr;
gint pg;
gint i, j;
priv = preview->priv;
if (event->window != GTK_LAYOUT (priv->layout)->bin_window)
bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (priv->layout));
if (event->window != bin_window)
return FALSE;
cr = gdk_cairo_create (GTK_LAYOUT (priv->layout)->bin_window);
cr = gdk_cairo_create (bin_window);
gdk_cairo_rectangle (cr, &event->area);
cairo_clip (cr);
......
......@@ -125,10 +125,12 @@ set_statusbar_width_chars (GtkWidget *statusbar,
PangoContext *context;
PangoFontMetrics *metrics;
gint char_width, digit_width, width;
GtkStyle *style;
context = gtk_widget_get_pango_context (statusbar);
style = gtk_widget_get_style (GTK_WIDGET (statusbar));
metrics = pango_context_get_metrics (context,
GTK_WIDGET (statusbar)->style->font_desc,
style->font_desc,
pango_context_get_language (context));
char_width = pango_font_metrics_get_approximate_digit_width (metrics);
......
......@@ -505,7 +505,7 @@ gedit_warning (GtkWindow *parent, const gchar *format, ...)
g_return_if_fail (format != NULL);
if (parent != NULL)
wg = parent->group;
wg = gtk_window_get_group (parent);
va_start (args, format);
str = g_strdup_vprintf (format, args);
......@@ -1372,7 +1372,7 @@ gedit_utils_drop_get_uris (GtkSelectionData *selection_data)
gint p = 0;
gchar **uri_list;
uris = g_uri_list_extract_uris ((gchar *) selection_data->data);
uris = g_uri_list_extract_uris ((gchar *) gtk_selection_data_get_data (selection_data));
uri_list = g_new0(gchar *, g_strv_length (uris) + 1);
for (i = 0; uris[i] != NULL; i++)
......
......@@ -2788,7 +2788,8 @@ fullscreen_controls_show (GeditWindow *window)
screen = gtk_window_get_screen (GTK_WINDOW (window));
gdk_screen_get_monitor_geometry (screen,
gdk_screen_get_monitor_at_window (screen, GTK_WIDGET (window)->window),
gdk_screen_get_monitor_at_window (screen,
gtk_widget_get_window (GTK_WIDGET (window))),
&fs_rect);
gtk_window_get_size (GTK_WINDOW (window->priv->fullscreen_controls), &w, &h);
......@@ -2812,7 +2813,8 @@ run_fullscreen_animation (gpointer data)
screen = gtk_window_get_screen (GTK_WINDOW (window));
gdk_screen_get_monitor_geometry (screen,
gdk_screen_get_monitor_at_window (screen, GTK_WIDGET (window)->window),
gdk_screen_get_monitor_at_window (screen,
gtk_widget_get_window (GTK_WIDGET (window))),
&fs_rect);
gtk_window_get_position (GTK_WINDOW (window->priv->fullscreen_controls),
......@@ -2886,7 +2888,8 @@ show_hide_fullscreen_toolbar (GeditWindow *window,
screen = gtk_window_get_screen (GTK_WINDOW (window));
gdk_screen_get_monitor_geometry (screen,
gdk_screen_get_monitor_at_window (screen, GTK_WIDGET (window)->window),
gdk_screen_get_monitor_at_window (screen,
gtk_widget_get_window (GTK_WIDGET (window))),
&fs_rect);
if (show)
......
......@@ -393,9 +393,9 @@ on_message_received (const char *message,
#ifdef GDK_WINDOWING_X11
if (startup_timestamp <= 0)
startup_timestamp = gdk_x11_get_server_time (GTK_WIDGET (window)->window);
startup_timestamp = gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (window)));
gdk_x11_window_set_user_time (GTK_WIDGET (window)->window,
gdk_x11_window_set_user_time (gtk_widget_get_window (GTK_WIDGET (window)),
startup_timestamp);
#endif
......
......@@ -256,7 +256,8 @@ enter_notify_event (GtkWidget *widget,
NULL, NULL, NULL);
if (view->priv->hover_path != NULL)
gdk_window_set_cursor (widget->window, view->priv->hand_cursor);
gdk_window_set_cursor (gtk_widget_get_window (widget),
view->priv->hand_cursor);
}
// Chainup
......@@ -279,9 +280,11 @@ motion_notify_event (GtkWidget * widget,
if ((old_hover_path != NULL) != (view->priv->hover_path != NULL)) {
if (view->priv->hover_path != NULL)
gdk_window_set_cursor (widget->window, view->priv->hand_cursor);
gdk_window_set_cursor (gtk_widget_get_window (widget),
view->priv->hand_cursor);
else
gdk_window_set_cursor (widget->window, NULL);
gdk_window_set_cursor (gtk_widget_get_window (widget),
NULL);
}
if (old_hover_path != NULL)
......@@ -317,7 +320,7 @@ set_click_policy_property (GeditFileBrowserView *obj,
}
if (GTK_WIDGET_REALIZED (GTK_WIDGET (obj))) {
win = GTK_WIDGET (obj)->window;
win = gtk_widget_get_window (GTK_WIDGET (obj));
gdk_window_set_cursor (win, NULL);
display = gtk_widget_get_display (GTK_WIDGET (obj));
......
......@@ -1102,10 +1102,11 @@ on_begin_loading (GeditFileBrowserStore *model,
GtkTreeIter *iter,
GeditFileBrowserWidget *obj)
{
if (!GDK_IS_WINDOW (GTK_WIDGET (obj->priv->treeview)->window))
if (!GDK_IS_WINDOW (gtk_widget_get_window (GTK_WIDGET (obj->priv->treeview))))
return;
gdk_window_set_cursor (GTK_WIDGET (obj)->window, obj->priv->busy_cursor);
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (obj)),
obj->priv->busy_cursor);
}
static void
......@@ -1113,10 +1114,10 @@ on_end_loading (GeditFileBrowserStore *model,
GtkTreeIter *iter,
GeditFileBrowserWidget *obj)
{
if (!GDK_IS_WINDOW (GTK_WIDGET (obj->priv->treeview)->window))
if (!GDK_IS_WINDOW (gtk_widget_get_window (GTK_WIDGET (obj->priv->treeview))))
return;
gdk_window_set_cursor (GTK_WIDGET (obj)->window, NULL);
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (obj)), NULL);
}
static void
......@@ -2035,7 +2036,7 @@ set_busy (GeditFileBrowserWidget *obj, gboolean busy)
GdkCursor *cursor;
GdkWindow *window;
window = GTK_WIDGET (obj->priv->treeview)->window;
window = gtk_widget_get_window (GTK_WIDGET (obj->priv->treeview));
if (!GDK_IS_WINDOW (window))
return;
......
......@@ -693,7 +693,7 @@ gedit_automatic_spell_checker_new (GeditDocument *doc,
GeditSpellChecker *checker)
{
GeditAutomaticSpellChecker *spell;
GtkTextTagTable *tag_table;
GtkTextIter start, end;
g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), NULL);
......@@ -707,11 +707,13 @@ gedit_automatic_spell_checker_new (GeditDocument *doc,
spell->doc = doc;
spell->spell_checker = g_object_ref (checker);
if (automatic_spell_checker_id == 0) {
if (automatic_spell_checker_id == 0)
{
automatic_spell_checker_id =
g_quark_from_string ("GeditAutomaticSpellCheckerID");
}
if (suggestion_id == 0) {
if (suggestion_id == 0)
{
suggestion_id = g_quark_from_string ("GeditAutoSuggestionID");
}
......@@ -760,20 +762,20 @@ gedit_automatic_spell_checker_new (GeditDocument *doc,
"underline", PANGO_UNDERLINE_ERROR,
NULL);
g_return_val_if_fail (GTK_TEXT_BUFFER (doc)->tag_table != NULL, NULL);
tag_table = gtk_text_buffer_get_tag_table (GTK_TEXT_BUFFER (doc));
gtk_text_tag_set_priority (spell->tag_highlight,
gtk_text_tag_table_get_size (GTK_TEXT_BUFFER (doc)->tag_table) - 1);
gtk_text_tag_table_get_size (tag_table) - 1);
g_signal_connect (GTK_TEXT_BUFFER (doc)->tag_table,
g_signal_connect (tag_table,
"tag-added",
G_CALLBACK (tag_added_or_removed),
spell);
g_signal_connect (GTK_TEXT_BUFFER (doc)->tag_table,
g_signal_connect (tag_table,
"tag-removed",
G_CALLBACK (tag_added_or_removed),
spell);
g_signal_connect (GTK_TEXT_BUFFER (doc)->tag_table,
g_signal_connect (tag_table,
"tag-changed",
G_CALLBACK (tag_changed),
spell);
......@@ -786,44 +788,55 @@ gedit_automatic_spell_checker_new (GeditDocument *doc,
"gedit-automatic-spell-checker-insert-start");
if (spell->mark_insert_start == NULL)
{
spell->mark_insert_start =
gtk_text_buffer_create_mark (GTK_TEXT_BUFFER (doc),
"gedit-automatic-spell-checker-insert-start",
&start,
TRUE);
}
else
{
gtk_text_buffer_move_mark (GTK_TEXT_BUFFER (doc),
spell->mark_insert_start,
&start);
}
spell->mark_insert_end = gtk_text_buffer_get_mark (GTK_TEXT_BUFFER (doc),
"gedit-automatic-spell-checker-insert-end");
if (spell->mark_insert_end == NULL)
{
spell->mark_insert_end =
gtk_text_buffer_create_mark (GTK_TEXT_BUFFER (doc),
"gedit-automatic-spell-checker-insert-end",
&start,
TRUE);
}
else
{
gtk_text_buffer_move_mark (GTK_TEXT_BUFFER (doc),
spell->mark_insert_end,
&start);
}
spell->mark_click = gtk_text_buffer_get_mark (GTK_TEXT_BUFFER (doc),
"gedit-automatic-spell-checker-click");
if (spell->mark_click == NULL)
{
spell->mark_click =
gtk_text_buffer_create_mark (GTK_TEXT_BUFFER (doc),
"gedit-automatic-spell-checker-click",
&start,
TRUE);
}
else
{
gtk_text_buffer_move_mark (GTK_TEXT_BUFFER (doc),
spell->mark_click,
&start);
}
spell->deferred_check = FALSE;
......@@ -862,7 +875,7 @@ gedit_automatic_spell_checker_free_internal (GeditAutomaticSpellChecker *spell)
g_return_if_fail (spell != NULL);
table = GTK_TEXT_BUFFER (spell->doc)->tag_table;
table = gtk_text_buffer_get_tag_table (GTK_TEXT_BUFFER (spell->doc));
if (table != NULL)
{
......
......@@ -265,7 +265,7 @@ create_dialog (GeditSpellCheckerDialog *dlg,
{
gtk_widget_show (error_widget);
gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start_defaults (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
error_widget);
return;
......
......@@ -145,9 +145,12 @@ create_dialog (GeditSpellLanguageDialog *dlg,
/* HIG defaults */
gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (dlg))),
5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dlg))),
6);
g_signal_connect (dlg,
"response",
......@@ -167,13 +170,13 @@ create_dialog (GeditSpellLanguageDialog *dlg,
{
gtk_widget_show (error_widget);
gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start_defaults (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
error_widget);
return;
}
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
content, TRUE, TRUE, 0);
g_object_unref (content);
gtk_container_set_border_width (GTK_CONTAINER (content), 5);
......
......@@ -773,9 +773,11 @@ get_configure_dialog (GeditTimePlugin *plugin)
/* HIG defaults */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog->dialog)), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog->dialog)->vbox), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog->dialog)->action_area), 5);
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog->dialog)->action_area), 6);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (dialog->dialog))),
5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog->dialog))), 6);
g_return_val_if_fail (dialog->dialog != NULL, NULL);
......@@ -799,7 +801,7 @@ get_configure_dialog (GeditTimePlugin *plugin)
if (!ret)
{
gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog->dialog)->vbox),
gtk_box_pack_start_defaults (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
error_widget);
gtk_container_set_border_width (GTK_CONTAINER (error_widget), 5);
......@@ -852,7 +854,7 @@ get_configure_dialog (GeditTimePlugin *plugin)
/* setup a window of a sane size. */
gtk_widget_set_size_request (GTK_WIDGET (viewport), 10, 200);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->dialog)->vbox),
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog))),
content, FALSE, FALSE, 0);
g_object_unref (content);
gtk_container_set_border_width (GTK_CONTAINER (content), 5);
......@@ -934,7 +936,7 @@ get_choose_format_dialog (GtkWindow *parent,
GtkWindowGroup *wg = NULL;
if (parent != NULL)
wg = parent->group;
wg = gtk_window_get_group (parent);
dialog = g_new0 (ChooseFormatDialog, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment