diff --git a/docs/devel/evolution-plugin-manual.xml b/docs/devel/evolution-plugin-manual.xml index 7b574bfedb..ba1af4d7a1 100644 --- a/docs/devel/evolution-plugin-manual.xml +++ b/docs/devel/evolution-plugin-manual.xml @@ -1240,7 +1240,7 @@ specific order, each containing a number of titled sections in a specific order, each containing a number of items. The variations are that the top-level widget may be a GtkNotebook or a GnomeDruid; and each - section may instrument a GtkBox, or a GtkTable. The definition of + section may instrument a GtkBox, or a GtkGrid. The definition of the available hooks will define what form they take. @@ -1283,7 +1283,7 @@ commit="function spec"? abort="function spec"?> * @@ -1492,7 +1492,7 @@ In this case the plugin has merely added a new section on the bottom of the HTML Mail settings page. When the factory is called - the plugin has a parent GtkTable (in this case, it could be a VBox) + the plugin has a parent GtkGrid (in this case, it could be a VBox) and borderless frame already defined, and it just has to instantiate its own control widgets, add them to the table, and return one of the widgets. The returned widget is used later if diff --git a/src/e-util/e-config.c b/src/e-util/e-config.c index 7d6a9b7c50..f3330fade0 100644 --- a/src/e-util/e-config.c +++ b/src/e-util/e-config.c @@ -61,7 +61,7 @@ struct _widget_node { EConfigItem *item; GtkWidget *widget; /* widget created by the factory, if any */ GtkWidget *frame; /* if created by us */ - GtkWidget *real_frame; /* used for sections and section tables, this is the real GtkFrame (whereas "frame" above is the internal vbox/table) */ + GtkWidget *real_frame; /* used for sections and section grids, this is the real GtkFrame (whereas "frame" above is the internal vbox/grid) */ guint empty:1; /* set if empty (i.e. hidden) */ }; @@ -358,7 +358,7 @@ ec_rebuild (EConfig *config) && sectionnode->frame != NULL && (item->type == E_CONFIG_PAGE || item->type == E_CONFIG_SECTION - || item->type == E_CONFIG_SECTION_TABLE)) { + || item->type == E_CONFIG_SECTION_GRID)) { if ((sectionnode->empty = (itemno == 0 || n_visible_widgets == 0))) { if (sectionnode->real_frame) gtk_widget_hide (sectionnode->real_frame); @@ -477,7 +477,7 @@ ec_rebuild (EConfig *config) G_CALLBACK (ec_widget_destroyed), wn); break; case E_CONFIG_SECTION: - case E_CONFIG_SECTION_TABLE: + case E_CONFIG_SECTION_GRID: /* The section factory is always called with * the parent vbox object. Even for assistant pages. */ if (page == NULL) { @@ -522,7 +522,7 @@ ec_rebuild (EConfig *config) if (section && ((item->type == E_CONFIG_SECTION && !GTK_IS_BOX (section)) - || (item->type == E_CONFIG_SECTION_TABLE && !GTK_IS_TABLE (section)))) + || (item->type == E_CONFIG_SECTION_GRID && !GTK_IS_GRID (section)))) g_warning ("EConfig section type is wrong"); } else { GtkWidget *frame; @@ -549,9 +549,9 @@ ec_rebuild (EConfig *config) if (item->type == E_CONFIG_SECTION) section = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); else { - section = gtk_table_new (1, 1, FALSE); - gtk_table_set_col_spacings ((GtkTable *) section, 6); - gtk_table_set_row_spacings ((GtkTable *) section, 6); + section = gtk_grid_new (); + gtk_grid_set_column_spacing (GTK_GRID (section), 6); + gtk_grid_set_row_spacing (GTK_GRID (section), 6); } gtk_widget_set_margin_top (section, 6); @@ -583,21 +583,21 @@ ec_rebuild (EConfig *config) sectionnode = wn; break; case E_CONFIG_ITEM: - case E_CONFIG_ITEM_TABLE: + case E_CONFIG_ITEM_GRID: /* generated sections never retain their widgets on a rebuild */ if (sectionnode && sectionnode->item->factory == NULL) wn->widget = NULL; /* ITEMs are called with the section parent. * The type depends on the section type, - * either a GtkTable, or a GtkVBox */ + * either a GtkGrid, or a GtkVBox */ w = NULL; if (section == NULL) { wn->widget = NULL; wn->frame = NULL; g_warning ("EConfig item has no parent section: %s", item->path); } else if ((item->type == E_CONFIG_ITEM && !GTK_IS_BOX (section)) - || (item->type == E_CONFIG_ITEM_TABLE && !GTK_IS_TABLE (section))) + || (item->type == E_CONFIG_ITEM_GRID && !GTK_IS_GRID (section))) g_warning ("EConfig item parent type is incorrect: %s", item->path); else if (item->factory) w = item->factory ( @@ -986,9 +986,9 @@ static const EPluginHookTargetKey config_hook_item_types[] = { { "page", E_CONFIG_PAGE }, { "section", E_CONFIG_SECTION }, - { "section_table", E_CONFIG_SECTION_TABLE }, + { "section_grid", E_CONFIG_SECTION_GRID }, { "item", E_CONFIG_ITEM }, - { "item_table", E_CONFIG_ITEM_TABLE }, + { "item_grid", E_CONFIG_ITEM_GRID }, { NULL }, }; @@ -1150,10 +1150,10 @@ config_hook_section_factory (EConfig *config, widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); break; - case E_CONFIG_SECTION_TABLE: - widget = gtk_table_new (1, 1, FALSE); - gtk_table_set_col_spacings (GTK_TABLE (widget), 6); - gtk_table_set_row_spacings (GTK_TABLE (widget), 6); + case E_CONFIG_SECTION_GRID: + widget = gtk_grid_new (); + gtk_grid_set_column_spacing (GTK_GRID (widget), 6); + gtk_grid_set_row_spacing (GTK_GRID (widget), 6); break; default: @@ -1192,7 +1192,7 @@ config_hook_construct_item (EPluginHook *eph, item->factory = config_hook_widget_factory; else if (item->type == E_CONFIG_SECTION) item->factory = (EConfigItemFactoryFunc) config_hook_section_factory; - else if (item->type == E_CONFIG_SECTION_TABLE) + else if (item->type == E_CONFIG_SECTION_GRID) item->factory = (EConfigItemFactoryFunc) config_hook_section_factory; d (printf (" path=%s label=%s factory=%s\n", item->path, item->label, (gchar *) item->user_data)); diff --git a/src/e-util/e-config.h b/src/e-util/e-config.h index 61ad44cbe7..33d6f842bf 100644 --- a/src/e-util/e-config.h +++ b/src/e-util/e-config.h @@ -119,12 +119,12 @@ enum _e_config_target_change_t { * The content of the section will be a GtkBox. If a factory is used * then it is up to the factory method to create the section and add * it to the parent page, and return a GtkBox for following sections. - * @E_CONFIG_SECTION_TABLE: A table section. The same as an - * @E_CONFIG_SECTION but the content object is a GtkTable instead. + * @E_CONFIG_SECTION_GRID: A table section. The same as an + * @E_CONFIG_SECTION but the content object is a GtkGrid instead. * @E_CONFIG_ITEM: A configuration item. It must have a parent * section defined in the configuration system. - * @E_CONFIG_ITEM_TABLE: A configuration item with a parent - * @E_CONFIG_SECTION_TABLE. + * @E_CONFIG_ITEM_GRID: A configuration item with a parent + * @E_CONFIG_SECTION_GRID. * * A configuration item type for each configuration item added to the * EConfig object. These are merged from all contributors to the @@ -139,9 +139,9 @@ enum _e_config_t { E_CONFIG_PAGE, E_CONFIG_SECTION, - E_CONFIG_SECTION_TABLE, + E_CONFIG_SECTION_GRID, E_CONFIG_ITEM, - E_CONFIG_ITEM_TABLE /* only allowed in table sections */ + E_CONFIG_ITEM_GRID /* only allowed in grid sections */ }; /** diff --git a/src/modules/calendar/e-calendar-preferences.c b/src/modules/calendar/e-calendar-preferences.c index 1a9657dab3..c6faeff00f 100644 --- a/src/modules/calendar/e-calendar-preferences.c +++ b/src/modules/calendar/e-calendar-preferences.c @@ -587,8 +587,8 @@ show_config (ECalendarPreferences *prefs) static ECalConfigItem eccp_items[] = { { E_CONFIG_BOOK, (gchar *) "", (gchar *) "toplevel-notebook", calendar_preferences_get_config_widget }, { E_CONFIG_PAGE, (gchar *) "00.general", (gchar *) "general", calendar_preferences_get_config_widget }, - { E_CONFIG_SECTION_TABLE, (gchar *) "00.general/00.time", (gchar *) "time", calendar_preferences_get_config_widget }, - { E_CONFIG_SECTION_TABLE, (gchar *) "00.general/10.workWeek", (gchar *) "workWeek", calendar_preferences_get_config_widget }, + { E_CONFIG_SECTION_GRID, (gchar *) "00.general/00.time", (gchar *) "time", calendar_preferences_get_config_widget }, + { E_CONFIG_SECTION_GRID, (gchar *) "00.general/10.workWeek", (gchar *) "workWeek", calendar_preferences_get_config_widget }, { E_CONFIG_SECTION, (gchar *) "00.general/20.alerts", (gchar *) "alerts", calendar_preferences_get_config_widget }, { E_CONFIG_PAGE, (gchar *) "10.display", (gchar *) "display", calendar_preferences_get_config_widget }, { E_CONFIG_SECTION, (gchar *) "10.display/00.general", (gchar *) "displayGeneral", calendar_preferences_get_config_widget }, diff --git a/src/modules/calendar/e-calendar-preferences.ui b/src/modules/calendar/e-calendar-preferences.ui index 96f6f100f0..24c01de8ec 100644 --- a/src/modules/calendar/e-calendar-preferences.ui +++ b/src/modules/calendar/e-calendar-preferences.ui @@ -161,16 +161,11 @@ - + True False - 4 - 2 6 6 - - - True @@ -181,10 +176,8 @@ 0 + 0 3 - 4 - GTK_FILL - @@ -221,11 +214,7 @@ 1 - 2 3 - 4 - GTK_FILL - GTK_FILL @@ -237,10 +226,7 @@ 1 - 2 2 - 3 - GTK_FILL @@ -253,10 +239,8 @@ 0 + 0 1 - 2 - GTK_FILL - @@ -270,10 +254,7 @@ 1 - 2 1 - 2 - GTK_FILL @@ -284,8 +265,8 @@ 0 - GTK_FILL - + 0 + 0 @@ -328,9 +309,7 @@ 1 - 2 - GTK_FILL - GTK_FILL + 0 @@ -398,10 +377,8 @@ 0 - 2 4 - 5 - GTK_FILL + 2 @@ -451,11 +428,9 @@ - + True False - 3 - 2 6 6 @@ -468,8 +443,8 @@ 0 - GTK_FILL - + 0 + 0 @@ -480,10 +455,8 @@ 0 + 0 1 - 2 - GTK_FILL - @@ -496,10 +469,8 @@ 0 + 0 2 - 3 - GTK_FILL - @@ -650,11 +621,7 @@ 1 - 2 1 - 2 - GTK_FILL - GTK_FILL @@ -673,9 +640,7 @@ 1 - 2 - GTK_FILL - GTK_FILL + 0 @@ -727,10 +692,7 @@ 1 - 2 2 - 3 - GTK_FILL diff --git a/src/modules/mail/em-mailer-prefs.c b/src/modules/mail/em-mailer-prefs.c index 7d8882a0d3..02a2a5145b 100644 --- a/src/modules/mail/em-mailer-prefs.c +++ b/src/modules/mail/em-mailer-prefs.c @@ -1239,7 +1239,7 @@ static EMConfigItem emmp_items[] = { /* no subvbox for section { E_CONFIG_PAGE, "30.headers/00.headers", "vbox199", emmp_widget_glade }, */ { E_CONFIG_PAGE, (gchar *) "40.junk", (gchar *) "vboxJunk", emmp_widget_glade }, /* no subvbox for section { E_CONFIG_SECTION, "40.junk/00.general", xxx, emmp_widget_glade } */ - { E_CONFIG_SECTION_TABLE, (gchar *) "40.junk/10.options", (gchar *) "junk-general-grid", emmp_widget_glade }, + { E_CONFIG_SECTION_GRID, (gchar *) "40.junk/10.options", (gchar *) "junk-general-grid", emmp_widget_glade }, }; static void diff --git a/src/modules/prefer-plain/plugin/config-ui.c b/src/modules/prefer-plain/plugin/config-ui.c index 3d1e78756a..560a8c5dac 100644 --- a/src/modules/prefer-plain/plugin/config-ui.c +++ b/src/modules/prefer-plain/plugin/config-ui.c @@ -99,6 +99,7 @@ prefer_plain_page_factory (EPlugin *epl, return data->old; check = gtk_check_button_new_with_mnemonic (_("Show s_uppressed HTML parts as attachments")); + gtk_widget_set_halign (check, GTK_ALIGN_START); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), epp_show_suppressed); gtk_widget_show (check); g_signal_connect ( @@ -118,6 +119,7 @@ prefer_plain_page_factory (EPlugin *epl, gtk_combo_box_set_model (dropdown, (GtkTreeModel *) store); /*gtk_combo_box_set_active(dropdown, -1);*/ gtk_combo_box_set_active (dropdown, epp_mode); + gtk_widget_set_hexpand (GTK_WIDGET (dropdown), TRUE); gtk_widget_show ((GtkWidget *) dropdown); dropdown_label = gtk_label_new_with_mnemonic (_("HTML _Mode")); @@ -137,13 +139,13 @@ prefer_plain_page_factory (EPlugin *epl, dropdown, "changed", G_CALLBACK (epp_mode_changed), info); - g_object_get (data->parent, "n-rows", &i, NULL); - gtk_table_attach ((GtkTable *) data->parent, check, 0, 2, i, i + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); - gtk_table_attach ((GtkTable *) data->parent, dropdown_label, 0, 1, i + 1, i + 2, 0, 0, 0, 0); - gtk_table_attach ((GtkTable *) data->parent, (GtkWidget *) dropdown, 1, 2, i + 1, i + 2, GTK_FILL | GTK_EXPAND, 0, 0, 0); - gtk_table_attach ((GtkTable *) data->parent, info, 1, 2, i + 2, i + 3, GTK_FILL | GTK_EXPAND, 0, 0, 0); + gtk_grid_attach_next_to (GTK_GRID (data->parent), check, NULL, GTK_POS_BOTTOM, 2, 1); + gtk_container_child_get (GTK_CONTAINER (data->parent), check, "top-attach", &i, NULL); + gtk_grid_attach (GTK_GRID (data->parent), dropdown_label, 0, i + 1, 1, 1); + gtk_grid_attach (GTK_GRID (data->parent), (GtkWidget *) dropdown, 1, i + 1, 1, 1); + gtk_grid_attach (GTK_GRID (data->parent), info, 1, i + 2, 1, 1); - /* since this isnt dynamic, we don't need to track each item */ + /* since this isn't dynamic, we don't need to track each item */ return (GtkWidget *) dropdown; } diff --git a/src/modules/prefer-plain/plugin/org-gnome-prefer-plain.eplug.xml b/src/modules/prefer-plain/plugin/org-gnome-prefer-plain.eplug.xml index 4ae2120d9f..54edf9198a 100644 --- a/src/modules/prefer-plain/plugin/org-gnome-prefer-plain.eplug.xml +++ b/src/modules/prefer-plain/plugin/org-gnome-prefer-plain.eplug.xml @@ -16,10 +16,10 @@ - - + + - \ No newline at end of file +