[anjuta] patch: Replace deprecated GtkTable by GtkGrid
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] patch: Replace deprecated GtkTable by GtkGrid
- Date: Sun, 27 Jan 2013 21:45:33 +0000 (UTC)
commit 17c2168782eb0cf009fb8415fc592857e8b64dac
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Sun Jan 27 22:23:16 2013 +0100
patch: Replace deprecated GtkTable by GtkGrid
plugins/patch/patch-plugin.c | 12 ++--
plugins/patch/patch-plugin.ui | 144 ++++++++++++++++++++++++----------------
2 files changed, 93 insertions(+), 63 deletions(-)
---
diff --git a/plugins/patch/patch-plugin.c b/plugins/patch/patch-plugin.c
index 0ca7966..9b68073 100644
--- a/plugins/patch/patch-plugin.c
+++ b/plugins/patch/patch-plugin.c
@@ -92,10 +92,12 @@ patch_show_gui (PatchPlugin *plugin)
table = GTK_WIDGET (gtk_builder_get_object (bxml, "patch_table"));
plugin->file_chooser = gtk_file_chooser_button_new(_("File/Directory to patch"),
- GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
+ GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
+ gtk_widget_set_hexpand (GTK_WIDGET (plugin->file_chooser), TRUE);
plugin->patch_chooser = gtk_file_chooser_button_new(_("Patch file"),
- GTK_FILE_CHOOSER_ACTION_OPEN);
+ GTK_FILE_CHOOSER_ACTION_OPEN);
+ gtk_widget_set_hexpand (GTK_WIDGET (plugin->patch_chooser), TRUE);
if (uri)
{
@@ -122,9 +124,9 @@ patch_show_gui (PatchPlugin *plugin)
gtk_file_filter_set_name (filter, _("All files"));
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (plugin->patch_chooser),
filter);
-
- gtk_table_attach_defaults(GTK_TABLE(table), plugin->file_chooser, 1, 2, 0, 1);
- gtk_table_attach_defaults(GTK_TABLE(table), plugin->patch_chooser, 1, 2, 1, 2);
+
+ gtk_grid_attach (GTK_GRID (table), plugin->file_chooser, 1, 0, 1, 1);
+ gtk_grid_attach (GTK_GRID (table), plugin->patch_chooser, 1, 1, 1, 1);
scale = GTK_WIDGET (gtk_builder_get_object (bxml, "patch_level_scale"));
adj = gtk_range_get_adjustment(GTK_RANGE(scale));
diff --git a/plugins/patch/patch-plugin.ui b/plugins/patch/patch-plugin.ui
index 5d47082..079d793 100644
--- a/plugins/patch/patch-plugin.ui
+++ b/plugins/patch/patch-plugin.ui
@@ -1,70 +1,114 @@
-<?xml version="1.0"?>
-<!--Generated with glade3 3.4.0 on Fri Feb 1 11:57:23 2008
- Version: 2.91.3
- Date: Sat Jul 29 21:16:15 2006
- User: jhs
- Host: idefix
--->
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">10</property>
- <property name="lower">0</property>
<property name="page_increment">10</property>
- <property name="step_increment">0</property>
- <property name="page_size">0</property>
- <property name="value">0</property>
</object>
<object class="GtkDialog" id="patch_dialog">
+ <property name="can_focus">False</property>
<property name="title" translatable="yes">Patch</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="type_hint">dialog</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
- <child>
- <object class="GtkTable" id="patch_table">
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">5</property>
- <property name="row_spacing">5</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
<child>
- <placeholder/>
+ <object class="GtkButton" id="cancel_button">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkButton" id="patch_button">
+ <property name="label">gtk-apply</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="patch_table">
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
<child>
<object class="GtkCheckButton" id="dryrun">
- <property name="visible">True</property>
<property name="label" translatable="yes">Dry run</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0.5</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="right_attach">2</property>
+ <property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="output">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
<packing>
- <property name="right_attach">2</property>
+ <property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="xpad">5</property>
<property name="ypad">5</property>
<property name="label" translatable="yes">File/Directory to patch:</property>
</object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
<object class="GtkLabel" id="label2">
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="xpad">5</property>
@@ -72,12 +116,15 @@
<property name="label" translatable="yes">Patch file:</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="xpad">5</property>
@@ -85,63 +132,44 @@
<property name="label" translatable="yes">Patch level:</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkHScale" id="patch_level_scale">
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="adjustment">adjustment1</property>
<property name="digits">0</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
- <object class="GtkButton" id="cancel_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- </object>
+ <placeholder/>
</child>
<child>
- <object class="GtkButton" id="patch_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="label" translatable="no">gtk-apply</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
+ <placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
+ <action-widget response="0">patch_button</action-widget>
</action-widgets>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]