[Spice-commits] 3 commits - gtk/spicy.c
Uri Lublin
uril at kemper.freedesktop.org
Wed Sep 5 03:05:37 PDT 2012
gtk/spicy.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
New commits:
commit 3af700278a70a107fc992bef26eb26b503f2f42e
Author: Uri Lublin <uril at redhat.com>
Date: Wed Sep 5 12:30:43 2012 +0300
spicy: add --title=<title> command line option
diff --git a/gtk/spicy.c b/gtk/spicy.c
index 8b3b087..142fc03 100644
--- a/gtk/spicy.c
+++ b/gtk/spicy.c
@@ -123,6 +123,7 @@ static void del_window(spice_connection *conn, SpiceWindow *win);
/* options */
static gboolean fullscreen = false;
static gboolean version = false;
+static char *spicy_title = NULL;
/* globals */
static GMainLoop *mainloop = NULL;
static int connections = 0;
@@ -1173,7 +1174,12 @@ static SpiceWindow *create_spice_window(spice_connection *conn, SpiceChannel *ch
/* toplevel */
win->toplevel = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- snprintf(title, sizeof(title), _("spice display %d:%d"), id, monitor_id);
+ if (spicy_title == NULL) {
+ snprintf(title, sizeof(title), _("spice display %d:%d"), id, monitor_id);
+ } else {
+ snprintf(title, sizeof(title), "%s", spicy_title);
+ }
+
gtk_window_set_title(GTK_WINDOW(win->toplevel), title);
g_signal_connect(G_OBJECT(win->toplevel), "window-state-event",
G_CALLBACK(window_state_cb), win);
@@ -1741,6 +1747,12 @@ static GOptionEntry cmd_entries[] = {
.arg_data = &version,
.description = N_("Display version and quit"),
},{
+ .long_name = "title",
+ .arg = G_OPTION_ARG_STRING,
+ .arg_data = &spicy_title,
+ .description = N_("Set the window title"),
+ .arg_description = N_("<title>"),
+ },{
/* end of list */
}
};
@@ -1907,5 +1919,7 @@ int main(int argc, char *argv[])
g_free(conf);
g_key_file_free(keyfile);
+ g_free(spicy_title);
+
return 0;
}
commit 8d078949f59ee2b90bfd02f7e0764d1eb61c384d
Author: Uri Lublin <uril at redhat.com>
Date: Wed Sep 5 10:38:10 2012 +0300
Revert "spice-common removed"
This reverts commit 519f118c7786aa0c16cd2a5f216b52cea4ac42d5.
diff --git a/spice-common b/spice-common
new file mode 160000
index 0000000..04dc2be
--- /dev/null
+++ b/spice-common
@@ -0,0 +1 @@
+Subproject commit 04dc2bee9ecdda7d7966f9267df37ab23bb5a802
commit 519f118c7786aa0c16cd2a5f216b52cea4ac42d5
Author: Uri Lublin <uril at redhat.com>
Date: Wed Sep 5 10:34:08 2012 +0300
spice-common removed
diff --git a/spice-common b/spice-common
deleted file mode 160000
index 04dc2be..0000000
--- a/spice-common
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 04dc2bee9ecdda7d7966f9267df37ab23bb5a802
More information about the Spice-commits
mailing list