[Xfce4-commits] <terminal:master> Make grid size a glong.

Nick Schermer noreply at xfce.org
Mon Dec 24 21:02:03 CET 2012


Updating branch refs/heads/master
         to d95756225c5b093e2593b962e67371cf8a5bc9e7 (commit)
       from 41eb074d07d8d73036e4f8e8ca38877f84da3f15 (commit)

commit d95756225c5b093e2593b962e67371cf8a5bc9e7
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Dec 24 17:48:33 2012 +0100

    Make grid size a glong.

 terminal/terminal-app.c    |    4 ++--
 terminal/terminal-screen.c |   20 ++++++++++----------
 terminal/terminal-screen.h |   12 ++++++------
 terminal/terminal-window.c |   23 +++++++++++++----------
 4 files changed, 31 insertions(+), 28 deletions(-)

diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 6c85945..c14b7c7 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -317,7 +317,7 @@ terminal_app_new_window (TerminalWindow *window,
   TerminalScreen     *terminal;
   GdkScreen          *screen;
   gboolean            inherit_geometry;
-  gint                w, h;
+  glong               w, h;
 
   screen = gtk_window_get_screen (GTK_WINDOW (window));
 
@@ -337,7 +337,7 @@ terminal_app_new_window (TerminalWindow *window,
           /* let the new window inherit the geometry from its parent */
           g_free (win_attr->geometry);
           terminal_screen_get_size (terminal, &w, &h);
-          win_attr->geometry = g_strdup_printf ("%dx%d", w, h);
+          win_attr->geometry = g_strdup_printf ("%ldx%ld", w, h);
         }
     }
 
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 4343ab8..1e68bb9 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -1170,8 +1170,8 @@ terminal_screen_vte_resize_window (VteTerminal    *terminal,
   GtkWidget *toplevel;
   gint       xpad = 0;
   gint       ypad = 0;
-  gint       grid_width;
-  gint       grid_height;
+  glong      grid_width;
+  glong      grid_height;
   GtkBorder *border = NULL;
 
   terminal_return_if_fail (VTE_IS_TERMINAL (terminal));
@@ -1526,8 +1526,8 @@ terminal_screen_set_custom_title (TerminalScreen *screen,
  **/
 void
 terminal_screen_get_size (TerminalScreen *screen,
-                          gint           *width_chars,
-                          gint           *height_chars)
+                          glong          *width_chars,
+                          glong          *height_chars)
 {
   terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
 
@@ -1547,8 +1547,8 @@ terminal_screen_get_size (TerminalScreen *screen,
  **/
 void
 terminal_screen_set_size (TerminalScreen *screen,
-                          gint            width_chars,
-                          gint            height_chars)
+                          glong           width_chars,
+                          glong           height_chars)
 {
   terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
 
@@ -1612,15 +1612,15 @@ terminal_screen_set_window_geometry_hints (TerminalScreen *screen,
 void
 terminal_screen_force_resize_window (TerminalScreen *screen,
                                      GtkWindow      *window,
-                                     gint            force_columns,
-                                     gint            force_rows)
+                                     glong           force_columns,
+                                     glong           force_rows)
 {
   GtkRequisition terminal_requisition;
   GtkRequisition window_requisition;
   gint           width;
   gint           height;
-  gint           columns;
-  gint           rows;
+  glong          columns;
+  glong          rows;
   gint           xpad = 0;
   gint           ypad = 0;
   GtkBorder     *border = NULL;
diff --git a/terminal/terminal-screen.h b/terminal/terminal-screen.h
index bea29c8..cf4badc 100644
--- a/terminal/terminal-screen.h
+++ b/terminal/terminal-screen.h
@@ -45,19 +45,19 @@ void         terminal_screen_set_custom_title             (TerminalScreen *scree
                                                            const gchar    *title);
 
 void         terminal_screen_get_size                     (TerminalScreen *screen,
-                                                           gint           *width_chars,
-                                                           gint           *height_chars);
+                                                           glong          *width_chars,
+                                                           glong          *height_chars);
 void         terminal_screen_set_size                     (TerminalScreen *screen,
-                                                           gint            width_chars,
-                                                           gint            height_chars);
+                                                           glong           width_chars,
+                                                           glong           height_chars);
 
 void         terminal_screen_set_window_geometry_hints    (TerminalScreen *screen,
                                                            GtkWindow      *window);
 
 void         terminal_screen_force_resize_window          (TerminalScreen *screen,
                                                            GtkWindow      *window,
-                                                           gint            force_columns,
-                                                           gint            force_rows);
+                                                           glong           force_columns,
+                                                           glong           force_rows);
 
 gchar       *terminal_screen_get_title                    (TerminalScreen *screen);
 
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 840b58b..5f95472 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -78,8 +78,8 @@ static gboolean        terminal_window_confirm_close                 (TerminalWi
 static void            terminal_window_set_size                      (TerminalWindow         *window);
 static void            terminal_window_set_size_force_grid           (TerminalWindow         *window,
                                                                       TerminalScreen         *screen,
-                                                                      gint                    force_grid_width,
-                                                                      gint                    force_grid_height);
+                                                                      glong                   force_grid_width,
+                                                                      glong                   force_grid_height);
 static gboolean        terminal_window_accel_activate                (GtkAccelGroup          *accel_group,
                                                                       GObject                *acceleratable,
                                                                       guint                   accel_key,
@@ -607,7 +607,7 @@ terminal_window_confirm_close (TerminalWindow *window)
 static void
 terminal_window_set_size (TerminalWindow *window)
 {
-  gint grid_width, grid_height;
+  glong grid_width, grid_height;
 
   terminal_return_if_fail (TERMINAL_IS_WINDOW (window));
 
@@ -623,9 +623,12 @@ terminal_window_set_size (TerminalWindow *window)
 static void
 terminal_window_set_size_force_grid (TerminalWindow *window,
                                      TerminalScreen *screen,
-                                     gint            force_grid_width,
-                                     gint            force_grid_height)
+                                     glong           force_grid_width,
+                                     glong           force_grid_height)
 {
+  terminal_return_if_fail (TERMINAL_IS_WINDOW (window));
+  terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
+
   /* required to get the char height/width right */
   if (!GTK_WIDGET_REALIZED (GTK_WIDGET (screen)))
     gtk_widget_realize (GTK_WIDGET (screen));
@@ -847,7 +850,7 @@ terminal_window_notebook_show_tabs (TerminalWindow *window)
   GtkNotebook *notebook = GTK_NOTEBOOK (window->notebook);
   gboolean     show_tabs = TRUE;
   gint         npages;
-  gint         width_chars, height_chars;
+  glong        width_chars, height_chars;
 
   /* set the visibility of the tabs */
   npages = gtk_notebook_get_n_pages (notebook);
@@ -878,7 +881,7 @@ terminal_window_notebook_page_added (GtkNotebook    *notebook,
                                      TerminalWindow *window)
 {
   TerminalScreen *screen = TERMINAL_SCREEN (child);
-  gint            w, h;
+  glong           w, h;
 
   terminal_return_if_fail (TERMINAL_IS_SCREEN (child));
   terminal_return_if_fail (TERMINAL_IS_WINDOW (window));
@@ -1784,15 +1787,15 @@ terminal_window_get_restart_command (TerminalWindow *window)
   GdkScreen   *gscreen;
   GList       *children, *lp;
   GSList      *result = NULL;
-  gint         w;
-  gint         h;
+  glong        w;
+  glong        h;
 
   terminal_return_val_if_fail (TERMINAL_IS_WINDOW (window), NULL);
 
   if (G_LIKELY (window->active != NULL))
     {
       terminal_screen_get_size (window->active, &w, &h);
-      result = g_slist_prepend (result, g_strdup_printf ("--geometry=%dx%d", w, h));
+      result = g_slist_prepend (result, g_strdup_printf ("--geometry=%ldx%ld", w, h));
     }
 
   gscreen = gtk_window_get_screen (GTK_WINDOW (window));


More information about the Xfce4-commits mailing list