[gimp/gtk3-port: 371/386] file-webp: kill GtkTable
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 371/386] file-webp: kill GtkTable
- Date: Wed, 9 May 2018 09:53:30 +0000 (UTC)
commit 1ca7d2e747f04ee48b8d090617bfb0cf22145828
Author: Simon Budig <simon budig de>
Date: Tue May 8 03:05:21 2018 +0200
file-webp: kill GtkTable
plug-ins/file-webp/file-webp-dialog.c | 72 ++++++++++++++++-----------------
1 files changed, 35 insertions(+), 37 deletions(-)
---
diff --git a/plug-ins/file-webp/file-webp-dialog.c b/plug-ins/file-webp/file-webp-dialog.c
index 6b35920..fdea28c 100644
--- a/plug-ins/file-webp/file-webp-dialog.c
+++ b/plug-ins/file-webp/file-webp-dialog.c
@@ -86,7 +86,7 @@ save_dialog (WebPSaveParams *params,
{
GtkWidget *dialog;
GtkWidget *vbox;
- GtkWidget *table;
+ GtkWidget *grid;
GtkWidget *expander;
GtkWidget *frame;
GtkWidget *vbox2;
@@ -113,20 +113,18 @@ save_dialog (WebPSaveParams *params,
vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
- /* Create the table */
- table = gtk_table_new (4, 3, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 6);
- gtk_table_set_col_spacings (GTK_TABLE (table), 6);
- gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
- gtk_widget_show (table);
+ /* Create the grid */
+ grid = gtk_grid_new ();
+ gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
+ gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
+ gtk_box_pack_start (GTK_BOX (vbox), grid, FALSE, FALSE, 0);
+ gtk_widget_show (grid);
/* Create the lossless checkbox */
toggle = gtk_check_button_new_with_label (_("Lossless"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
params->lossless);
- gtk_table_attach (GTK_TABLE (table), toggle,
- 0, 3, row, row + 1,
- GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach (GTK_GRID (grid), toggle, 0, row, 3, 1);
gtk_widget_show (toggle);
row++;
@@ -135,18 +133,18 @@ save_dialog (WebPSaveParams *params,
¶ms->lossless);
/* Create the slider for image quality */
- quality_scale = gimp_scale_entry_new (GTK_TABLE (table),
- 0, row++,
- _("Image quality:"),
- 125,
- 0,
- params->quality,
- 0.0, 100.0,
- 1.0, 10.0,
- 0, TRUE,
- 0.0, 0.0,
- _("Image quality"),
- NULL);
+ quality_scale = gimp_scale_entry_new_grid (GTK_GRID (grid),
+ 0, row++,
+ _("Image quality:"),
+ 125,
+ 0,
+ params->quality,
+ 0.0, 100.0,
+ 1.0, 10.0,
+ 0, TRUE,
+ 0.0, 0.0,
+ _("Image quality"),
+ NULL);
gimp_scale_entry_set_sensitive (quality_scale, ! params->lossless);
g_signal_connect (quality_scale, "value-changed",
@@ -154,18 +152,18 @@ save_dialog (WebPSaveParams *params,
¶ms->quality);
/* Create the slider for alpha channel quality */
- alpha_quality_scale = gimp_scale_entry_new (GTK_TABLE (table),
- 0, row++,
- _("Alpha quality:"),
- 125,
- 0,
- params->alpha_quality,
- 0.0, 100.0,
- 1.0, 10.0,
- 0, TRUE,
- 0.0, 0.0,
- _("Alpha channel quality"),
- NULL);
+ alpha_quality_scale = gimp_scale_entry_new_grid (GTK_GRID (grid),
+ 0, row++,
+ _("Alpha quality:"),
+ 125,
+ 0,
+ params->alpha_quality,
+ 0.0, 100.0,
+ 1.0, 10.0,
+ 0, TRUE,
+ 0.0, 0.0,
+ _("Alpha channel quality"),
+ NULL);
gimp_scale_entry_set_sensitive (alpha_quality_scale, ! params->lossless);
g_signal_connect (alpha_quality_scale, "value-changed",
@@ -188,9 +186,9 @@ save_dialog (WebPSaveParams *params,
"Icon", WEBP_PRESET_ICON,
"Text", WEBP_PRESET_TEXT,
NULL);
- label = gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
- _("Source type:"), 0.0, 0.5,
- combo, 2, FALSE);
+ label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, row++,
+ _("Source type:"), 0.0, 0.5,
+ combo, 2);
gimp_help_set_help_data (label,
_("WebP encoder \"preset\""),
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]