[f-spot] Migrate repair_dialog to GtkBuilder.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Migrate repair_dialog to GtkBuilder.
- Date: Sun, 20 Jun 2010 16:57:18 +0000 (UTC)
commit 7f9f32b3291895efad58b8c22954535b0efb40f1
Author: Ademir Mendoza <ademir mendoza gmail com>
Date: Sat Jun 19 23:52:22 2010 -0500
Migrate repair_dialog to GtkBuilder.
https://bugzilla.gnome.org/show_bug.cgi?id=620844
src/Makefile.am | 2 +
src/UI.Dialog/RepairDialog.cs | 10 ++--
src/f-spot.glade | 63 -------------------------------
src/ui/repair_dialog.ui | 83 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 90 insertions(+), 68 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 52d15b0..f253236 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -163,6 +163,7 @@ SOURCES = \
UI.Dialog/ProgressDialog.cs \
UI.Dialog/RatingFilterDialog.cs \
UI.Dialog/RepairDbDialog.cs \
+ UI.Dialog/RepairDialog.cs \
UI.Dialog/SelectionRatioDialog.cs \
UI.Dialog/TagSelectionDialog.cs \
UI.Dialog/ThreadProgressDialog.cs \
@@ -228,6 +229,7 @@ RESOURCES = \
UI.Dialog/ui/PreferenceDialog.ui \
UI.Dialog/ui/RatingFilterDialog.ui \
ui/create_tag_dialog.ui \
+ ui/repair_dialog.ui \
FSpot.addin.xml
include $(top_srcdir)/build/build.mk
diff --git a/src/UI.Dialog/RepairDialog.cs b/src/UI.Dialog/RepairDialog.cs
index b004dd1..53afa29 100644
--- a/src/UI.Dialog/RepairDialog.cs
+++ b/src/UI.Dialog/RepairDialog.cs
@@ -13,16 +13,16 @@ using System;
using System.IO;
using FSpot.Widgets;
-namespace FSpot.UI.Dialog
+namespace FSpot. UI.Dialog
{
- public class RepairDialog : GladeDialog
+ public class RepairDialog : BuilderDialog
{
- [Glade.Widget] ScrolledWindow view_scrolled;
+ [GtkBeans.Builder.Object] ScrolledWindow view_scrolled;
IBrowsableCollection source;
PhotoList missing;
- public RepairDialog (IBrowsableCollection collection) : base ("repair_dialog")
+ public RepairDialog (IBrowsableCollection collection) : base ("repair_dialog.ui", "repair_dialog")
{
source = collection;
missing = new PhotoList ();
@@ -31,7 +31,7 @@ namespace FSpot.UI.Dialog
TrayView view = new TrayView (missing);
view_scrolled.Add (view);
- this.Dialog.ShowAll ();
+ this.ShowAll ();
}
public void FindMissing ()
diff --git a/src/f-spot.glade b/src/f-spot.glade
index c2d2db8..bfead47 100644
--- a/src/f-spot.glade
+++ b/src/f-spot.glade
@@ -1395,69 +1395,6 @@ between</property>
</widget>
</child>
</widget>
- <widget class="GtkDialog" id="repair_dialog">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Repair</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox16">
- <property name="visible">True</property>
- <child>
- <widget class="GtkHBox" id="hbox90">
- <property name="visible">True</property>
- <child>
- <widget class="GtkScrolledWindow" id="view_scrolled">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area16">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <widget class="GtkButton" id="cancelbutton8">
- <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>
- <property name="response_id">-6</property>
- </widget>
- </child>
- <child>
- <widget class="GtkButton" id="okbutton9">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="response_id">-5</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
<widget class="GtkDialog" id="viewer_preferences">
<property name="visible">True</property>
<property name="title" translatable="yes">Preferences</property>
diff --git a/src/ui/repair_dialog.ui b/src/ui/repair_dialog.ui
new file mode 100644
index 0000000..dc45127
--- /dev/null
+++ b/src/ui/repair_dialog.ui
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<interface>
+ <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="repair_dialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Repair</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox16">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkHBox" id="hbox90">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkScrolledWindow" id="view_scrolled">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area16">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancelbutton8">
+ <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">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="okbutton9">
+ <property name="label">gtk-ok</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">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancelbutton8</action-widget>
+ <action-widget response="-5">okbutton9</action-widget>
+ </action-widgets>
+ </object>
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]