gnome-terminal r3130 - trunk/src



Author: chpe
Date: Tue Oct  7 14:30:45 2008
New Revision: 3130
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3130&view=rev

Log:
Rename.

Modified:
   trunk/src/terminal-options.c
   trunk/src/terminal-options.h
   trunk/src/terminal.c

Modified: trunk/src/terminal-options.c
==============================================================================
--- trunk/src/terminal-options.c	(original)
+++ trunk/src/terminal-options.c	Tue Oct  7 14:30:45 2008
@@ -90,46 +90,46 @@
 }
 
 static void
-apply_defaults (OptionParsingResults *results,
+apply_defaults (TerminalOptions *options,
                 InitialWindow        *iw)
 {
-  if (results->default_role)
+  if (options->default_role)
     {
-      iw->role = results->default_role;
-      results->default_role = NULL;
+      iw->role = options->default_role;
+      options->default_role = NULL;
     }
 
   if (iw->geometry == NULL)
-    iw->geometry = g_strdup (results->default_geometry);
+    iw->geometry = g_strdup (options->default_geometry);
 
-  if (results->default_window_menubar_forced)
+  if (options->default_window_menubar_forced)
     {
       iw->force_menubar_state = TRUE;
-      iw->menubar_state = results->default_window_menubar_state;
+      iw->menubar_state = options->default_window_menubar_state;
 
-      results->default_window_menubar_forced = FALSE;
+      options->default_window_menubar_forced = FALSE;
     }
 
-  iw->start_fullscreen |= results->default_fullscreen;
-  iw->start_maximized |= results->default_maximize;
+  iw->start_fullscreen |= options->default_fullscreen;
+  iw->start_maximized |= options->default_maximize;
 }
 
 static InitialWindow*
-ensure_top_window (OptionParsingResults *results)
+ensure_top_window (TerminalOptions *options)
 {
   InitialWindow *iw;
 
-  if (results->initial_windows == NULL)
+  if (options->initial_windows == NULL)
     {
       iw = initial_window_new (NULL, FALSE);
-      apply_defaults (results, iw);
+      apply_defaults (options, iw);
 
-      results->initial_windows = g_list_append (results->initial_windows,
+      options->initial_windows = g_list_append (options->initial_windows,
                                                 iw);
     }
   else
     {
-      iw = g_list_last (results->initial_windows)->data;
+      iw = g_list_last (options->initial_windows)->data;
     }
 
   g_assert (iw->tabs);
@@ -138,12 +138,12 @@
 }
 
 static InitialTab*
-ensure_top_tab (OptionParsingResults *results)
+ensure_top_tab (TerminalOptions *options)
 {
   InitialWindow *iw;
   InitialTab *it;
 
-  iw = ensure_top_window (results);
+  iw = ensure_top_window (options);
 
   g_assert (iw->tabs);
 
@@ -153,7 +153,7 @@
 }
 
 static InitialWindow*
-add_new_window (OptionParsingResults *results,
+add_new_window (TerminalOptions *options,
                 const char           *profile,
                 gboolean              is_id)
 {
@@ -161,9 +161,9 @@
 
   iw = initial_window_new (profile, is_id);
 
-  apply_defaults (results, iw);
+  apply_defaults (options, iw);
 
-  results->initial_windows = g_list_append (results->initial_windows, iw);
+  options->initial_windows = g_list_append (options->initial_windows, iw);
 
   return iw;
 }
@@ -200,7 +200,7 @@
                          gpointer     data,
                          GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
   GError *err = NULL;
   char  **exec_argv;
 
@@ -216,17 +216,17 @@
       return FALSE;
     }
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
-      InitialTab *it = ensure_top_tab (results);
+      InitialTab *it = ensure_top_tab (options);
 
       g_strfreev (it->exec_argv);
       it->exec_argv = exec_argv;
     }
   else
     {
-      g_strfreev (results->exec_argv);
-      results->exec_argv = exec_argv;
+      g_strfreev (options->exec_argv);
+      options->exec_argv = exec_argv;
     }
 
   return TRUE;
@@ -238,11 +238,11 @@
                    gpointer     data,
                    GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
-      InitialTab *it = ensure_top_tab (results);
+      InitialTab *it = ensure_top_tab (options);
 
       g_free (it->profile);
       it->profile = g_strdup (value);
@@ -250,9 +250,9 @@
     }
   else
     {
-      g_free (results->default_profile);
-      results->default_profile = g_strdup (value);
-      results->default_profile_is_id = FALSE;
+      g_free (options->default_profile);
+      options->default_profile = g_strdup (value);
+      options->default_profile_is_id = FALSE;
     }
 
   return TRUE;
@@ -264,11 +264,11 @@
                       gpointer     data,
                       GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
-      InitialTab *it = ensure_top_tab (results);
+      InitialTab *it = ensure_top_tab (options);
 
       g_free (it->profile);
       it->profile = g_strdup (value);
@@ -276,9 +276,9 @@
     }
   else
     {
-      g_free (results->default_profile);
-      results->default_profile = g_strdup (value);
-      results->default_profile_is_id = TRUE;
+      g_free (options->default_profile);
+      options->default_profile = g_strdup (value);
+      options->default_profile_is_id = TRUE;
     }
 
   return TRUE;
@@ -291,12 +291,12 @@
                         gpointer     data,
                         GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
   gboolean is_profile_id;
 
   is_profile_id = g_str_has_suffix (option_name, "-with-profile-internal-id");
 
-  add_new_window (results, value, is_profile_id);
+  add_new_window (options, value, is_profile_id);
 
   return TRUE;
 }
@@ -307,20 +307,20 @@
                      gpointer     data,
                      GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
   gboolean is_profile_id;
 
   is_profile_id = g_str_has_suffix (option_name, "-with-profile-internal-id");
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
       InitialWindow *iw;
 
-      iw = g_list_last (results->initial_windows)->data;
+      iw = g_list_last (options->initial_windows)->data;
       iw->tabs = g_list_append (iw->tabs, initial_tab_new (value, is_profile_id));
     }
   else
-    add_new_window (results, value, is_profile_id);
+    add_new_window (options, value, is_profile_id);
 
   return TRUE;
 }
@@ -331,16 +331,16 @@
                       gpointer     data,
                       GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
   InitialWindow *iw;
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
-      iw = g_list_last (results->initial_windows)->data;
+      iw = g_list_last (options->initial_windows)->data;
       iw->role = g_strdup (value);
     }
-  else if (!results->default_role)
-    results->default_role = g_strdup (value);
+  else if (!options->default_role)
+    options->default_role = g_strdup (value);
   else
     {
       g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_FAILED,
@@ -357,12 +357,12 @@
                               gpointer     data,
                               GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
   InitialWindow *iw;
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
-      iw = g_list_last (results->initial_windows)->data;
+      iw = g_list_last (options->initial_windows)->data;
       if (iw->force_menubar_state && iw->menubar_state == TRUE)
         {
           g_printerr (_("\"%s\" option given twice for the same window\n"),
@@ -376,8 +376,8 @@
     }
   else
     {
-      results->default_window_menubar_forced = TRUE;
-      results->default_window_menubar_state = TRUE;
+      options->default_window_menubar_forced = TRUE;
+      options->default_window_menubar_state = TRUE;
     }
 
   return TRUE;
@@ -389,12 +389,12 @@
                               gpointer     data,
                               GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
   InitialWindow *iw;
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
-      iw = g_list_last (results->initial_windows)->data;
+      iw = g_list_last (options->initial_windows)->data;
 
       if (iw->force_menubar_state && iw->menubar_state == FALSE)
         {
@@ -408,8 +408,8 @@
     }
   else
     {
-      results->default_window_menubar_forced = TRUE;
-      results->default_window_menubar_state = FALSE;
+      options->default_window_menubar_forced = TRUE;
+      options->default_window_menubar_state = FALSE;
     }
 
   return TRUE;
@@ -421,16 +421,16 @@
                           gpointer     data,
                           GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
   InitialWindow *iw;
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
-      iw = g_list_last (results->initial_windows)->data;
+      iw = g_list_last (options->initial_windows)->data;
       iw->start_maximized = TRUE;
     }
   else
-    results->default_maximize = TRUE;
+    options->default_maximize = TRUE;
 
   return TRUE;
 }
@@ -441,17 +441,17 @@
                             gpointer     data,
                             GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
       InitialWindow *iw;
 
-      iw = g_list_last (results->initial_windows)->data;
+      iw = g_list_last (options->initial_windows)->data;
       iw->start_fullscreen = TRUE;
     }
   else
-    results->default_fullscreen = TRUE;
+    options->default_fullscreen = TRUE;
 
   return TRUE;
 }
@@ -462,17 +462,17 @@
                           gpointer     data,
                           GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
       InitialWindow *iw;
 
-      iw = g_list_last (results->initial_windows)->data;
+      iw = g_list_last (options->initial_windows)->data;
       iw->geometry = g_strdup (value);
     }
   else
-    results->default_geometry = g_strdup (value);
+    options->default_geometry = g_strdup (value);
 
   return TRUE;
 }
@@ -483,9 +483,9 @@
                                  gpointer     data,
                                  GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
 
-  results->use_factory = FALSE;
+  options->use_factory = FALSE;
 
   return TRUE;
 }
@@ -496,19 +496,19 @@
                        gpointer     data,
                        GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
-      InitialTab *it = ensure_top_tab (results);
+      InitialTab *it = ensure_top_tab (options);
 
       g_free (it->title);
       it->title = g_strdup (value);
     }
   else
     {
-      g_free (results->default_title);
-      results->default_title = g_strdup (value);
+      g_free (options->default_title);
+      options->default_title = g_strdup (value);
     }
 
   return TRUE;
@@ -520,19 +520,19 @@
                                    gpointer     data,
                                    GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
-      InitialTab *it = ensure_top_tab (results);
+      InitialTab *it = ensure_top_tab (options);
 
       g_free (it->working_dir);
       it->working_dir = g_strdup (value);
     }
   else
     {
-      g_free (results->default_working_dir);
-      results->default_working_dir = g_strdup (value);
+      g_free (options->default_working_dir);
+      options->default_working_dir = g_strdup (value);
     }
 
   return TRUE;
@@ -544,10 +544,10 @@
                         gpointer     data,
                         GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
   InitialTab *it;
 
-  it = ensure_top_tab (results);
+  it = ensure_top_tab (options);
   it->active = TRUE;
 
   return TRUE;
@@ -559,7 +559,7 @@
                       gpointer     data,
                       GError     **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
   double zoom;
   char *end;
 
@@ -596,14 +596,14 @@
       zoom = TERMINAL_SCALE_MAXIMUM;
     }
 
-  if (results->initial_windows)
+  if (options->initial_windows)
     {
-      InitialTab *it = ensure_top_tab (results);
+      InitialTab *it = ensure_top_tab (options);
       it->zoom = zoom;
       it->zoom_set = TRUE;
     }
   else
-    results->zoom = zoom;
+    options->zoom = zoom;
 
   return TRUE;
 }
@@ -615,16 +615,16 @@
                          gpointer      data,
                          GError      **error)
 {
-  OptionParsingResults *results = data;
+  TerminalOptions *options = data;
   InitialTab    *it;
 
   /* make sure we have some window in case no options were given */
-  if (results->initial_windows == NULL)
-    it = ensure_top_tab (results);
+  if (options->initial_windows == NULL)
+    it = ensure_top_tab (options);
 
-  if (results->execute)
+  if (options->execute)
     {
-      if (results->exec_argv == NULL)
+      if (options->exec_argv == NULL)
         {
           g_set_error (error,
                        G_OPTION_ERROR,
@@ -636,49 +636,49 @@
         }
 
       /* Apply -x/--execute command only to the first tab */
-      it = ensure_top_tab (results);
-      it->exec_argv = results->exec_argv;
-      results->exec_argv = NULL;
+      it = ensure_top_tab (options);
+      it->exec_argv = options->exec_argv;
+      options->exec_argv = NULL;
     }
 
   return TRUE;
 }
 
-OptionParsingResults *
-option_parsing_results_new (const char *working_directory,
+TerminalOptions *
+option_options_new (const char *working_directory,
                             const char *display_name,
                             const char *startup_id,
                             const char **env,
                             int *argc,
                             char **argv)
 {
-  OptionParsingResults *results;
+  TerminalOptions *options;
   int i;
 
-  results = g_slice_new0 (OptionParsingResults);
+  options = g_slice_new0 (TerminalOptions);
 
-  results->default_window_menubar_forced = FALSE;
-  results->default_window_menubar_state = TRUE;
-  results->default_fullscreen = FALSE;
-  results->default_maximize = FALSE;
-  results->execute = FALSE;
-  results->use_factory = TRUE;
-
-  results->env = g_strdupv ((char **) env);
-  results->startup_id = g_strdup (startup_id);
-  results->display_name = g_strdup (display_name);
-  results->initial_windows = NULL;
-  results->default_role = NULL;
-  results->default_geometry = NULL;
-  results->default_title = NULL;
-  results->zoom = 1.0;
+  options->default_window_menubar_forced = FALSE;
+  options->default_window_menubar_state = TRUE;
+  options->default_fullscreen = FALSE;
+  options->default_maximize = FALSE;
+  options->execute = FALSE;
+  options->use_factory = TRUE;
+
+  options->env = g_strdupv ((char **) env);
+  options->startup_id = g_strdup (startup_id);
+  options->display_name = g_strdup (display_name);
+  options->initial_windows = NULL;
+  options->default_role = NULL;
+  options->default_geometry = NULL;
+  options->default_title = NULL;
+  options->zoom = 1.0;
 
-  results->screen_number = -1;
-  results->default_working_dir = g_strdup (working_directory);
+  options->screen_number = -1;
+  options->default_working_dir = g_strdup (working_directory);
 
   /* The old -x/--execute option is broken, so we need to pre-scan for it. */
   /* We now also support passing the command after the -- switch. */
-  results->exec_argv = NULL;
+  options->exec_argv = NULL;
   for (i = 1 ; i < *argc; ++i)
     {
       gboolean is_execute;
@@ -691,7 +691,7 @@
       if (!is_execute && !is_dashdash)
         continue;
 
-      results->execute = is_execute;
+      options->execute = is_execute;
 
       /* Skip the switch */
       last = i;
@@ -700,41 +700,41 @@
         break; /* we'll complain about this later for -x/--execute; it's fine for -- */
 
       /* Collect the args, and remove them from argv */
-      results->exec_argv = g_new0 (char*, *argc - i + 1);
+      options->exec_argv = g_new0 (char*, *argc - i + 1);
       for (j = 0; i < *argc; ++i, ++j)
-        results->exec_argv[j] = g_strdup (argv[i]);
-      results->exec_argv[j] = NULL;
+        options->exec_argv[j] = g_strdup (argv[i]);
+      options->exec_argv[j] = NULL;
 
       *argc = last;
       break;
     }
 
-  return results;
+  return options;
 }
 
 void
-option_parsing_results_free (OptionParsingResults *results)
+option_options_free (TerminalOptions *options)
 {
-  g_list_foreach (results->initial_windows, (GFunc) initial_window_free, NULL);
-  g_list_free (results->initial_windows);
+  g_list_foreach (options->initial_windows, (GFunc) initial_window_free, NULL);
+  g_list_free (options->initial_windows);
 
-  g_strfreev (results->env);
-  g_free (results->default_role);
-  g_free (results->default_geometry);
-  g_free (results->default_working_dir);
-  g_free (results->default_title);
-  g_free (results->default_profile);
+  g_strfreev (options->env);
+  g_free (options->default_role);
+  g_free (options->default_geometry);
+  g_free (options->default_working_dir);
+  g_free (options->default_title);
+  g_free (options->default_profile);
 
-  g_strfreev (results->exec_argv);
+  g_strfreev (options->exec_argv);
 
-  g_free (results->display_name);
-  g_free (results->startup_id);
+  g_free (options->display_name);
+  g_free (options->startup_id);
 
-  g_slice_free (OptionParsingResults, results);
+  g_slice_free (TerminalOptions, options);
 }
 
 void
-option_parsing_results_check_for_display_name (OptionParsingResults *results,
+option_options_check_for_display_name (TerminalOptions *options,
                                                int *argc, char **argv)
 {
   int i;
@@ -766,8 +766,8 @@
             }
 
           g_assert (i+1 < *argc);
-          g_free (results->display_name);
-          results->display_name = g_strdup (argv[i+1]);
+          g_free (options->display_name);
+          options->display_name = g_strdup (argv[i+1]);
 
           remove_two = TRUE;
         }
@@ -791,7 +791,7 @@
           end = NULL;
           n = g_ascii_strtoll (argv[i+1], &end, 0);
           if (errno == 0 && argv[i+1] != end)
-            results->screen_number = n;
+            options->screen_number = n;
 
           remove_two = TRUE;
         }
@@ -825,7 +825,7 @@
 }
 
 GOptionContext *
-terminal_options_get_goption_context (OptionParsingResults *parsing_results)
+terminal_options_get_goption_context (TerminalOptions *options)
 {
   const GOptionEntry global_unique_goptions[] = {
     {
@@ -1025,7 +1025,7 @@
       0,
       G_OPTION_FLAG_HIDDEN,
       G_OPTION_ARG_FILENAME,
-      &parsing_results->default_working_dir,
+      &options->default_working_dir,
       NULL, NULL,
     },
     {
@@ -1033,7 +1033,7 @@
       0,
       G_OPTION_FLAG_HIDDEN,
       G_OPTION_ARG_NONE,
-      &parsing_results->use_factory,
+      &options->use_factory,
       NULL, NULL
     },
     {
@@ -1041,7 +1041,7 @@
       0,
       G_OPTION_FLAG_HIDDEN,
       G_OPTION_ARG_STRING,
-      &parsing_results->startup_id,
+      &options->startup_id,
       NULL,
       NULL
     },
@@ -1229,7 +1229,7 @@
   group = g_option_group_new ("gnome-terminal",
                               N_("GNOME Terminal Emulator"),
                               N_("Show GNOME Terminal options"),
-                              parsing_results,
+                              options,
                               NULL);
   g_option_group_set_translation_domain (group, GETTEXT_PACKAGE);
   g_option_group_add_entries (group, global_unique_goptions);
@@ -1240,7 +1240,7 @@
   group = g_option_group_new ("terminal",
                               N_("Options to open new windows or terminal tabs; more than one of these may be specified:"),
                               N_("Show terminal options"),
-                              parsing_results,
+                              options,
                               NULL);
   g_option_group_set_translation_domain (group, GETTEXT_PACKAGE);
   g_option_group_add_entries (group, global_multiple_goptions);
@@ -1249,7 +1249,7 @@
   group = g_option_group_new ("window-options",
                               N_("Window options; if used before the first --window or --tab argument, sets the default for all windows:"),
                               N_("Show per-window options"),
-                              parsing_results,
+                              options,
                               NULL);
   g_option_group_set_translation_domain (group, GETTEXT_PACKAGE);
   g_option_group_add_entries (group, window_goptions);
@@ -1258,7 +1258,7 @@
   group = g_option_group_new ("terminal-options",
                               N_("Terminal options; if used before the first --window or --tab argument, sets the default for all terminals:"),
                               N_("Show per-terminal options"),
-                              parsing_results,
+                              options,
                               NULL);
   g_option_group_set_translation_domain (group, GETTEXT_PACKAGE);
   g_option_group_add_entries (group, terminal_goptions);

Modified: trunk/src/terminal-options.h
==============================================================================
--- trunk/src/terminal-options.h	(original)
+++ trunk/src/terminal-options.h	Tue Oct  7 14:30:45 2008
@@ -59,9 +59,9 @@
   gboolean  execute;
   gboolean  use_factory;
   double    zoom;
-} OptionParsingResults;
+} TerminalOptions;
 
-GOptionContext *get_goption_context (OptionParsingResults *parsing_results);
+GOptionContext *get_goption_context (TerminalOptions *options);
 
 typedef struct
 {
@@ -90,18 +90,18 @@
 
 } InitialWindow;
 
-OptionParsingResults *option_parsing_results_new (const char *working_directory,
+TerminalOptions *option_options_new (const char *working_directory,
                                                   const char *display_name,
                                                   const char *startup_id,
                                                   const char **env,
                                                   int *argc,
                                                   char **argv);
 
-void option_parsing_results_free (OptionParsingResults *results);
+void option_options_free (TerminalOptions *options);
 
-GOptionContext * terminal_options_get_goption_context (OptionParsingResults *parsing_results);
+GOptionContext * terminal_options_get_goption_context (TerminalOptions *options);
 
-void option_parsing_results_check_for_display_name (OptionParsingResults *results,
+void option_options_check_for_display_name (TerminalOptions *options,
                                                     int *argc, char **argv);
 
 G_END_DECLS

Modified: trunk/src/terminal.c
==============================================================================
--- trunk/src/terminal.c	(original)
+++ trunk/src/terminal.c	Tue Oct  7 14:30:45 2008
@@ -186,7 +186,7 @@
 
 static void
 new_terminal_with_options (TerminalApp *app,
-                           OptionParsingResults *results)
+                           TerminalOptions *results)
 {
   GList *lw;
   GdkScreen *screen;
@@ -369,7 +369,7 @@
   const char *startup_id;
   const char *display_name;
   GdkDisplay *display;
-  OptionParsingResults *parsing_results;
+  TerminalOptions *options;
   DBusGConnection *connection;
   DBusGProxy *proxy;
   guint32 request_name_ret;
@@ -385,11 +385,11 @@
     argv_copy [i] = argv [i];
   argv_copy [i] = NULL;
 
-  parsing_results = option_parsing_results_new (NULL, NULL, NULL, NULL, &argc, argv);
+  options = option_options_new (NULL, NULL, NULL, NULL, &argc, argv);
   startup_id = g_getenv ("DESKTOP_STARTUP_ID");
   if (startup_id != NULL && startup_id[0] != '\0')
     {
-      parsing_results->startup_id = g_strdup (startup_id);
+      options->startup_id = g_strdup (startup_id);
       g_unsetenv ("DESKTOP_STARTUP_ID");
     }
 
@@ -397,7 +397,7 @@
                                                      * to complicated factory setup
                                                      */
 
-  context = terminal_options_get_goption_context (parsing_results);
+  context = terminal_options_get_goption_context (options);
   g_option_context_add_group (context, gtk_get_option_group (TRUE));
   g_option_context_add_group (context, egg_sm_client_get_option_group ());
 
@@ -413,20 +413,20 @@
   g_set_application_name (_("Terminal"));
   
  /* Do this here so that gdk_display is initialized */
-  if (parsing_results->startup_id == NULL)
+  if (options->startup_id == NULL)
     {
       /* Create a fake one containing a timestamp that we can use */
       Time timestamp;
       timestamp = slowly_and_stupidly_obtain_timestamp (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
 
-      parsing_results->startup_id = g_strdup_printf ("_TIME%lu", timestamp);
+      options->startup_id = g_strdup_printf ("_TIME%lu", timestamp);
     }
 
   display = gdk_display_get_default ();
   display_name = gdk_display_get_name (display);
-  parsing_results->display_name = g_strdup (display_name);
+  options->display_name = g_strdup (display_name);
   
-  if (!parsing_results->use_factory)
+  if (!options->use_factory)
     goto factory_disabled;
 
   /* Now try to acquire register us as the terminal factory */
@@ -491,8 +491,8 @@
                                          TERMINAL_FACTORY_INTERFACE_NAME);
       if (!org_gnome_Terminal_Factory_new_terminal (proxy,
                                                     g_get_current_dir (),
-                                                    parsing_results->display_name,
-                                                    parsing_results->startup_id,
+                                                    options->display_name,
+                                                    options->startup_id,
                                                     (const char **) env,
                                                     (const char **) argv_copy,
                                                     &error))
@@ -514,7 +514,7 @@
 
       g_free (argv_copy);
       g_strfreev (env);
-      option_parsing_results_free (parsing_results);
+      option_options_free (options);
 
       exit (ret);
     }
@@ -534,11 +534,11 @@
   gtk_about_dialog_set_url_hook (about_url_hook, NULL, NULL);
   gtk_about_dialog_set_email_hook (about_email_hook, NULL, NULL);
 
-  terminal_app_initialize (parsing_results->use_factory);
+  terminal_app_initialize (options->use_factory);
   g_signal_connect (terminal_app_get (), "quit", G_CALLBACK (gtk_main_quit), NULL);
 
-  new_terminal_with_options (terminal_app_get (), parsing_results);
-  option_parsing_results_free (parsing_results);
+  new_terminal_with_options (terminal_app_get (), options);
+  option_options_free (options);
 
   gtk_main ();
 
@@ -553,9 +553,9 @@
 /* Factory stuff */
 
 static gboolean
-handle_new_terminal_event (OptionParsingResults *parsing_results)
+handle_new_terminal_event (TerminalOptions *options)
 {
-  new_terminal_with_options (terminal_app_get (), parsing_results);
+  new_terminal_with_options (terminal_app_get (), options);
 
   return FALSE;
 }
@@ -569,7 +569,7 @@
                                const char **arguments,
                                GError **error)
 {
-  OptionParsingResults *parsing_results;
+  TerminalOptions *options;
   GOptionContext *context;
   char **argv;
   int argc;
@@ -577,7 +577,7 @@
   argc = g_strv_length ((char **) arguments);
   argv = (char **) g_memdup (arguments, (argc + 1) * sizeof (char *));
 
-  parsing_results = option_parsing_results_new (working_directory,
+  options = option_options_new (working_directory,
                                                 display_name,
                                                 startup_id,
                                                 env,
@@ -585,14 +585,14 @@
 
   /* FIXMEchpe: I don't think we need this for the forwarded args! */
   /* Find and parse --display */
-  option_parsing_results_check_for_display_name (parsing_results, &argc, argv);
+  option_options_check_for_display_name (options, &argc, argv);
 
-  context = terminal_options_get_goption_context (parsing_results);
+  context = terminal_options_get_goption_context (options);
   g_option_context_set_ignore_unknown_options (context, TRUE);
   if (!g_option_context_parse (context, &argc, &argv, error))
     {
       g_option_context_free (context);
-      option_parsing_results_free (parsing_results);
+      option_options_free (options);
 
       return FALSE;
     }
@@ -600,8 +600,8 @@
 
   g_idle_add_full (G_PRIORITY_HIGH_IDLE,
                    (GSourceFunc) handle_new_terminal_event,
-                   parsing_results,
-                   (GDestroyNotify) option_parsing_results_free);
+                   options,
+                   (GDestroyNotify) option_options_free);
 
   return TRUE;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]