gnome-terminal r2899 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2899 - trunk/src
- Date: Sun, 15 Jun 2008 21:17:56 +0000 (UTC)
Author: chpe
Date: Sun Jun 15 21:17:56 2008
New Revision: 2899
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2899&view=rev
Log:
Bug 528683 â "gnome-terminal --geometry <width>x<height>" doesn't work well.
Modified:
trunk/src/terminal.c
Modified: trunk/src/terminal.c
==============================================================================
--- trunk/src/terminal.c (original)
+++ trunk/src/terminal.c Sun Jun 15 21:17:56 2008
@@ -89,7 +89,6 @@
char **post_execute_args;
gboolean execute;
- char *geometry;
gboolean use_factory;
char *zoom;
} OptionParsingResults;
@@ -188,19 +187,14 @@
apply_defaults (OptionParsingResults *results,
InitialWindow *iw)
{
- g_assert (iw->geometry == NULL);
-
if (results->default_role)
{
iw->role = results->default_role;
results->default_role = NULL;
}
- if (results->default_geometry)
- {
- iw->geometry = results->default_geometry;
- results->default_geometry = NULL;
- }
+ if (iw->geometry == NULL)
+ iw->geometry = g_strdup (results->default_geometry);
if (results->default_window_menubar_forced)
{
@@ -526,8 +520,7 @@
return TRUE;
}
-
-static gboolean
+static gboolean
option_fullscreen_callback (const gchar *option_name,
const gchar *value,
gpointer data,
@@ -547,8 +540,28 @@
return TRUE;
}
+static gboolean
+option_geometry_callback (const gchar *option_name,
+ const gchar *value,
+ gpointer data,
+ GError **error)
+{
+ OptionParsingResults *results = data;
-static gboolean
+ if (results->initial_windows)
+ {
+ InitialWindow *iw;
+
+ iw = g_list_last (results->initial_windows)->data;
+ iw->geometry = g_strdup (value);
+ }
+ else
+ results->default_geometry = g_strdup (value);
+
+ return TRUE;
+}
+
+static gboolean
option_disable_factory_callback (const gchar *option_name,
const gchar *value,
gpointer data,
@@ -617,7 +630,6 @@
{
OptionParsingResults *results = data;
InitialTab *it;
- InitialWindow *iw;
/* make sure we have some window in case no options were given */
if (results->initial_windows == NULL)
@@ -640,19 +652,6 @@
it->exec_argv = results->post_execute_args;
results->post_execute_args = NULL;
}
-
-
- if (results->geometry)
- {
- if (results->initial_windows)
- {
- iw = g_list_last (results->initial_windows)->data;
- iw->geometry = g_strdup (results->geometry);
- }
- else if (!results->default_geometry)
- results->default_geometry = g_strdup (results->geometry);
- }
-
if (results->zoom)
{
@@ -720,7 +719,6 @@
results->initial_windows = NULL;
results->default_role = NULL;
results->default_geometry = NULL;
- results->geometry = NULL;
results->zoom = NULL;
results->screen_number = -1;
@@ -778,7 +776,6 @@
g_free (results->display_name);
g_free (results->startup_id);
- g_free (results->geometry);
g_free (results->zoom);
g_slice_free (OptionParsingResults, results);
@@ -1370,8 +1367,8 @@
"geometry",
0,
0,
- G_OPTION_ARG_STRING,
- &parsing_results->geometry,
+ G_OPTION_ARG_CALLBACK,
+ option_geometry_callback,
N_("X geometry specification (see \"X\" man page), can be specified once per window to be opened."),
N_("GEOMETRY")
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]