muine r1235 - in trunk: . data/glade po src
- From: plaes svn gnome org
- To: svn-commits-list gnome org
- Subject: muine r1235 - in trunk: . data/glade po src
- Date: Sat, 8 Nov 2008 11:30:31 +0000 (UTC)
Author: plaes
Date: Sat Nov 8 11:30:31 2008
New Revision: 1235
URL: http://svn.gnome.org/viewvc/muine?rev=1235&view=rev
Log:
2008-11-07 Priit Laes <plaes svn gnome org>
Bug 559631 â [PATCH] Drop glade implementation for error dialogs.
* TODO:
* po/POTFILES.in:
* src/Makefile.am:
* src/ErrorDialog.cs:
* src/OverwriteDialog.cs:
* data/glade/Makefile.am:
R data/glade/ErrorDialog.glade:
R data/glade/OverwriteDialog.glade:
Use GtkMessageDialog instead of glade-based dialogs.
Removed:
trunk/data/glade/ErrorDialog.glade
trunk/data/glade/OverwriteDialog.glade
Modified:
trunk/ChangeLog
trunk/TODO
trunk/data/glade/Makefile.am
trunk/po/POTFILES.in
trunk/src/ErrorDialog.cs
trunk/src/Makefile.am
trunk/src/OverwriteDialog.cs
Modified: trunk/TODO
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Sat Nov 8 11:30:31 2008
@@ -57,14 +57,10 @@
Depends on Gnome Bugzilla #164085
o Use Hashtable/dictionary in D-Bus song info code
Depends on Freedesktop Bugzilla #2175
-o Create message dialogs ourselves, not through glade
- Once we have Gtk 2.6 support in Gtk#
o Set Window.IconName on windows
Once we have Gtk 2.6 support in Gtk#
o Use stock Gtk pixbuf colouring
Once we have Gtk 2.6 support in Gtk# and a new Gtk release
-o Remove EllipsizingLabel hack class
- Once we have Gtk 2.6 support in Gtk#
o Use Gtk.StatusIcon
Once we have Gtk 2.10 support in Gtk#
o Re-enable fixed-height-mode in HandleView
Modified: trunk/data/glade/Makefile.am
==============================================================================
--- trunk/data/glade/Makefile.am (original)
+++ trunk/data/glade/Makefile.am Sat Nov 8 11:30:31 2008
@@ -3,8 +3,6 @@
AddWindow.glade \
SkipToWindow.glade \
NoMusicFoundWindow.glade \
- ErrorDialog.glade \
- OverwriteDialog.glade \
ProgressWindow.glade \
InfoWindow.glade \
PlaylistFilling.glade \
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Sat Nov 8 11:30:31 2008
@@ -2,8 +2,6 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
data/glade/AddWindow.glade
-data/glade/ErrorDialog.glade
-data/glade/OverwriteDialog.glade
data/glade/PlaylistWindow.glade
data/glade/ProgressWindow.glade
data/glade/SkipToWindow.glade
Modified: trunk/src/ErrorDialog.cs
==============================================================================
--- trunk/src/ErrorDialog.cs (original)
+++ trunk/src/ErrorDialog.cs Sat Nov 8 11:30:31 2008
@@ -29,8 +29,7 @@
public class ErrorDialog
{
// Widgets
- [Glade.Widget] private Dialog window;
- [Glade.Widget] private Label label;
+ private MessageDialog window;
// Constructor
// TODO: Shouldn't the ErrorDialog be able to be
@@ -66,19 +65,16 @@
/// </param>
public ErrorDialog (string s1, string s2)
{
- Glade.XML gxml =
- new Glade.XML (null, "ErrorDialog.glade", "window", null);
-
- gxml.Autoconnect (this);
-
string s1_esc = StringUtils.EscapeForPango (s1);
string s2_esc = StringUtils.EscapeForPango (s2);
string markup = String.Format ("<span size=\"large\" weight=\"bold\">{0}</span>", s1_esc);
- markup += Environment.NewLine;
- markup += Environment.NewLine;
- markup += s2_esc;
- label.Markup = markup;
+
+ window = new Gtk.MessageDialog (null, DialogFlags.DestroyWithParent,
+ MessageType.Error, ButtonsType.Close, true, markup);
+
+ window.SecondaryText = s2_esc;
+ window.Title = Catalog.GetString("Error");
window.Run ();
window.Destroy ();
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Sat Nov 8 11:30:31 2008
@@ -73,8 +73,6 @@
MUINE_RESOURCES = \
-resource:$(top_srcdir)/data/glade/PlaylistWindow.glade,PlaylistWindow.glade \
-resource:$(top_srcdir)/data/glade/SkipToWindow.glade,SkipToWindow.glade \
- -resource:$(top_srcdir)/data/glade/ErrorDialog.glade,ErrorDialog.glade \
- -resource:$(top_srcdir)/data/glade/OverwriteDialog.glade,OverwriteDialog.glade \
-resource:$(top_srcdir)/data/glade/AddWindow.glade,AddWindow.glade \
-resource:$(top_srcdir)/data/glade/ProgressWindow.glade,ProgressWindow.glade \
-resource:$(top_srcdir)/data/ui/PlaylistWindow.xml,PlaylistWindow.xml \
Modified: trunk/src/OverwriteDialog.cs
==============================================================================
--- trunk/src/OverwriteDialog.cs (original)
+++ trunk/src/OverwriteDialog.cs Sat Nov 8 11:30:31 2008
@@ -30,6 +30,9 @@
public class OverwriteDialog
{
// Strings
+ private static readonly string window_title =
+ Catalog.GetString ("Overwrite File?");
+
private static readonly string string_primary_text =
Catalog.GetString ("Overwrite \"{0}\"?");
@@ -38,8 +41,7 @@
"If you choose to overwrite this file, the contents will be lost.");
// Widgets
- [Glade.Widget] private Dialog window;
- [Glade.Widget] private Label label;
+ private MessageDialog window;
// Constructor
public OverwriteDialog (Window parent, string fn)
@@ -61,15 +63,19 @@
string string_secondary_text_esc =
StringUtils.EscapeForPango (string_secondary_text);
+
string fmt = "<span size=\"large\" weight=\"bold\">{0}</span>";
string markup = String.Format (fmt, primary_text_esc);
- markup += Environment.NewLine;
- markup += Environment.NewLine;
- markup += string_secondary_text_esc;
- label.Markup = markup;
- //
- window.TransientFor = parent;
+ window = new Gtk.MessageDialog (parent, DialogFlags.DestroyWithParent,
+ MessageType.Question, ButtonsType.None, true, markup);
+
+ window.AddButton (Gtk.Stock.Cancel, ResponseType.Cancel);
+ window.AddButton (Catalog.GetString ("_Overwrite"), ResponseType.Yes);
+
+ window.Title = window_title;
+ window.SecondaryText = string_secondary_text_esc;
+
}
// Methods
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]