[glade] Fixed bug #660874 "glade-previewer fails to open UI files without top windows"
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Fixed bug #660874 "glade-previewer fails to open UI files without top windows"
- Date: Tue, 4 Oct 2011 20:43:43 +0000 (UTC)
commit d5162993bfe7e4cc8c3600a2625ce7242d55f1ab
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Tue Oct 4 16:53:33 2011 -0300
Fixed bug #660874 "glade-previewer fails to open UI files without top windows"
ChangeLog | 4 ++++
gladeui/glade-previewer.c | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c8bd57f..398511a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2011-10-04 Juan Pablo Ugarte <juanpablougarte gmail com>
+ * gladeui/glade-previewer.c: fixed bug #660874
+ "glade-previewer fails to open UI files without top windows"
+ o Fixed runtime warnings in option parsing.
+
* gladeui/glade-base-editor.c, gladeui/glade-project.c: fixed spelling errors
2011-09-19 Juan Pablo Ugarte <juanpablougarte gmail com>
diff --git a/gladeui/glade-previewer.c b/gladeui/glade-previewer.c
index 58d9a9b..dee26f1 100644
--- a/gladeui/glade-previewer.c
+++ b/gladeui/glade-previewer.c
@@ -58,10 +58,10 @@ parse_arguments (int argc, char **argv, gchar ** toplevel_name,
GError *error = NULL;
GOptionEntry entries[] = {
- {"filename", 'f', G_OPTION_FLAG_FILENAME | G_OPTION_FLAG_OPTIONAL_ARG,
+ {"filename", 'f', G_OPTION_ARG_NONE,
G_OPTION_ARG_FILENAME, file_name, _("Name of the file to preview"),
"FILENAME"},
- {"toplevel", 't', G_OPTION_FLAG_OPTIONAL_ARG,
+ {"toplevel", 't', G_OPTION_ARG_NONE,
G_OPTION_ARG_STRING, toplevel_name, _("Name of the toplevel to preview"),
"TOPLEVELNAME"},
{"listen", 'l', 0, G_OPTION_ARG_NONE, &listen, _("Listen standard input"),
@@ -130,6 +130,7 @@ get_toplevel (gchar * name, gchar * string, gsize length)
if (GTK_IS_WIDGET (objects->data) && toplevel == NULL)
{
toplevel = GTK_WIDGET (objects->data);
+ g_object_ref (toplevel);
}
if (GTK_IS_WINDOW (objects->data))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]