[f-spot] Port PhotoPath tool to GtkBuilder
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Port PhotoPath tool to GtkBuilder
- Date: Tue, 24 Aug 2010 10:40:25 +0000 (UTC)
commit dbe886a46fb9850e68625af923a4930bc7e99a67
Author: Paul Lange <palango gmx de>
Date: Fri Aug 20 22:40:24 2010 +0200
Port PhotoPath tool to GtkBuilder
po/POTFILES.in | 2 +-
.../FSpot.Tools.ChangePhotoPath.csproj | 8 +-
.../ChangePhotoPathGui.cs | 13 +-
.../Tools/FSpot.Tools.ChangePhotoPath/Makefile.am | 2 +-
.../{ChangePhotoPath.glade => ChangePhotoPath.ui} | 117 +++++++++++---------
5 files changed, 78 insertions(+), 64 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6a5c71f..80ac1e4 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -133,7 +133,7 @@ src/Extensions/Exporters/FSpot.Exporters.Tabblo/FSpot.Exporters.Tabblo/TabbloExp
[type: gettext/glade]src/Extensions/Exporters/FSpot.Exporters.Tabblo/Resources/ui/TrustError.ui
src/Extensions/Exporters/FSpot.Exporters.Zip/FSpot.Exporters.Zip/ZipExport.cs
[type: gettext/glade]src/Extensions/Exporters/FSpot.Exporters.Zip/Resources/zip_export.ui
-[type: gettext/glade]src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Resources/ChangePhotoPath.glade
+[type: gettext/glade]src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Resources/ChangePhotoPath.ui
src/Extensions/Tools/FSpot.Tools.DevelopInUFraw/FSpot.Tools.DevelopInUFraw/DevelopInUFRawBatch.cs
src/Extensions/Tools/FSpot.Tools.HashJob/FSpot.Tools.HashJob/HashJob.cs
src/Extensions/Tools/FSpot.Tools.LiveWebGallery/FSpot.Tools.LiveWebGallery/GalleryRequestHandler.cs
diff --git a/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath.csproj b/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath.csproj
index e6dae51..e5e4419 100644
--- a/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath.csproj
+++ b/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath.csproj
@@ -40,8 +40,8 @@
<EmbeddedResource Include="Resources\ChangePhotoPath.addin.xml">
<LogicalName>ChangePhotoPath.addin.xml</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="Resources\ChangePhotoPath.glade">
- <LogicalName>ChangePhotoPath.glade</LogicalName>
+ <EmbeddedResource Include="Resources\ChangePhotoPath.ui">
+ <LogicalName>ChangePhotoPath.ui</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ProjectExtensions>
@@ -64,6 +64,10 @@
<Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="System" />
<Reference Include="System.Core" />
+ <Reference Include="gtk-sharp-beans, Version=2.14.0.0, Culture=neutral, PublicKeyToken=97a95fb57b03c03a">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\lib\gtk-sharp-beans\gtk-sharp-beans.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\lib\Hyena\Hyena.Gui\Hyena.Gui.csproj">
diff --git a/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath/ChangePhotoPathGui.cs b/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath/ChangePhotoPathGui.cs
index a977276..e982b7d 100644
--- a/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath/ChangePhotoPathGui.cs
+++ b/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/FSpot.Tools.ChangePhotoPath/ChangePhotoPathGui.cs
@@ -21,16 +21,15 @@ namespace FSpot.Tools.ChangePhotoPath
public class Dump : Gtk.Dialog, ICommand, IChangePhotoPathGui
{
private string dialog_name = "ChangePhotoPath";
- private Glade.XML xml;
+ private GtkBeans.Builder builder;
private Gtk.Dialog dialog;
private ChangePathController contr;
private ProgressDialog progress_dialog;
private int progress_dialog_total = 0;
- [Glade.Widget] Gtk.Entry old_common_uri;
- [Glade.Widget] Gtk.Label new_common_uri;
-// [Glade.Widget] Gtk.ProgressBar progress_bar;
+ [GtkBeans.Builder.Object] Gtk.Entry old_common_uri;
+ [GtkBeans.Builder.Object] Gtk.Label new_common_uri;
private bool LaunchController()
{
@@ -70,14 +69,14 @@ namespace FSpot.Tools.ChangePhotoPath
private void CreateDialog()
{
- xml = new Glade.XML (null, "ChangePhotoPath.glade", dialog_name, "f-spot");
- xml.Autoconnect (this);
+ builder = new GtkBeans.Builder (null, "ChangePhotoPath.ui", null);
+ builder.Autoconnect (this);
}
private Gtk.Dialog Dialog {
get {
if (dialog == null)
- dialog = (Gtk.Dialog) xml.GetWidget (dialog_name);
+ dialog = new Gtk.Dialog (builder.GetRawObject (dialog_name));
return dialog;
}
}
diff --git a/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Makefile.am b/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Makefile.am
index 31fe9f7..86ef854 100755
--- a/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Makefile.am
+++ b/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Makefile.am
@@ -10,6 +10,6 @@ SOURCES = \
RESOURCES = \
Resources/ChangePhotoPath.addin.xml \
- Resources/ChangePhotoPath.glade
+ Resources/ChangePhotoPath.ui
include $(top_srcdir)/build/build.mk
diff --git a/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Resources/ChangePhotoPath.glade b/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Resources/ChangePhotoPath.ui
old mode 100755
new mode 100644
similarity index 67%
rename from src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Resources/ChangePhotoPath.glade
rename to src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Resources/ChangePhotoPath.ui
index dde2a3c..e367df2
--- a/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Resources/ChangePhotoPath.glade
+++ b/src/Extensions/Tools/FSpot.Tools.ChangePhotoPath/Resources/ChangePhotoPath.ui
@@ -1,40 +1,41 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
- <widget class="GtkDialog" id="ChangePhotoPath">
+<?xml version="1.0"?>
+<interface>
+ <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="ChangePhotoPath">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Change Photos directory</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
+ <object class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkFrame" id="frame1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="label_xalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="shadow_type">none</property>
<child>
- <widget class="GtkEventBox" id="eventbox1">
+ <object class="GtkEventBox" id="eventbox1">
<property name="visible">True</property>
<child>
- <widget class="GtkAlignment" id="alignment1">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkTable" id="table1">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
- <widget class="GtkEntry" id="old_common_uri">
+ <object class="GtkEntry" id="old_common_uri">
<property name="visible">True</property>
<property name="can_focus">True</property>
- </widget>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
@@ -43,10 +44,10 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="new_common_uri">
+ <object class="GtkLabel" id="new_common_uri">
<property name="visible">True</property>
<property name="xalign">0</property>
- </widget>
+ </object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
@@ -56,40 +57,37 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="xalign">0.10000000149011612</property>
<property name="label" translatable="yes">Old base path (URI) was</property>
- </widget>
+ </object>
</child>
<child>
- <widget class="GtkLabel" id="label3">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="xalign">0.10000000149011612</property>
<property name="label" translatable="yes">Change base path (URI) to</property>
- </widget>
+ </object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- <child>
- <widget class="GtkLabel" id="label1">
+ <child type="label">
+ <object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="label" translatable="yes"><b>Specify the toplevel Photos directories</b></property>
<property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ </object>
</child>
- </widget>
+ </object>
<packing>
<property name="position">1</property>
</packing>
@@ -101,70 +99,83 @@
<placeholder/>
</child>
<child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
+ <object class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="cancel">
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
+ <property name="receives_default">False</property>
<property name="use_stock">True</property>
- <property name="response_id">-6</property>
- </widget>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
- <widget class="GtkButton" id="Apply">
+ <object class="GtkButton" id="Apply">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="response_id">-5</property>
+ <property name="receives_default">False</property>
<child>
- <widget class="GtkAlignment" id="alignment2">
+ <object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
- <widget class="GtkHBox" id="hbox1">
+ <object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkImage" id="image1">
+ <object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-ok</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label4">
+ <object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="label">_Apply changes</property>
<property name="use_underline">True</property>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
</child>
- </widget>
+ </object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
+ </object>
<packing>
<property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
- </widget>
+ </object>
</child>
- </widget>
-</glade-interface>
+ <action-widgets>
+ <action-widget response="-6">cancel</action-widget>
+ <action-widget response="-5">Apply</action-widget>
+ </action-widgets>
+ </object>
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]