[gnome-terminal] Remove approximate scrollback memory size indicator



commit 694cec54acd6968b6eb62f8e66145aa6eecc7939
Author: Christian Persch <chpe gnome org>
Date:   Mon Sep 28 22:27:22 2009 +0200

    Remove approximate scrollback memory size indicator
    
    Remove the label showing approx. memory used by the scrollback from the
    profile preferences. With vte 0.22, the scrollback is disk-based, taking
    no process memory, and tus this doesn't make sense anymore.

 src/profile-editor.c          |   24 ------------------------
 src/profile-preferences.glade |   27 +--------------------------
 2 files changed, 1 insertions(+), 50 deletions(-)
---
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 08160a6..5aed33a 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -29,9 +29,6 @@
 #include "profile-editor.h"
 #include "terminal-util.h"
 
-/* Behdad estimates this to about 1 byte/cell, approx. */
-#define BYTES_PER_LINE ((goffset) 80)
-
 typedef struct _TerminalColorScheme TerminalColorScheme;
 
 struct _TerminalColorScheme
@@ -460,23 +457,6 @@ visible_name_entry_changed_cb (GtkEntry *entry,
 }
 
 static void
-scrollback_lines_spin_button_changed_cb (GtkSpinButton *button,
-                                         GParamSpec *pspec,
-                                         GtkLabel *label)
-{
-  double lines;
-  char *kbtext, *text;
-
-  lines = gtk_spin_button_get_value (button);
-  kbtext = g_format_size_for_display (((goffset) (lines + 0.5)) * BYTES_PER_LINE);
-  /* Translators: %s will be a data size, e.g. "(about 500kB)" */
-  text = g_strdup_printf (_("(about %s)"), kbtext);
-  gtk_label_set_text (label, text);
-  g_free (kbtext);
-  g_free (text);
-}
-
-static void
 reset_compat_defaults_cb (GtkWidget       *button,
                           TerminalProfile *profile)
 {
@@ -787,10 +767,6 @@ terminal_profile_edit (TerminalProfile *profile,
   g_signal_connect (GTK_WIDGET (gtk_builder_get_object (builder, "profile-name-entry")),
                     "changed",
                     G_CALLBACK (visible_name_entry_changed_cb), editor);
-  g_signal_connect (GTK_WIDGET (gtk_builder_get_object  (builder, "scrollback-lines-spinbutton")),
-                    "notify::value",
-                    G_CALLBACK (scrollback_lines_spin_button_changed_cb),
-                    GTK_WIDGET (gtk_builder_get_object  (builder, "scrollback-kb-label")));
 
   g_signal_connect (gtk_builder_get_object  (builder, "reset-compat-defaults-button"),
                     "clicked",
diff --git a/src/profile-preferences.glade b/src/profile-preferences.glade
index 7ce2894..ad3c994 100644
--- a/src/profile-preferences.glade
+++ b/src/profile-preferences.glade
@@ -2116,7 +2116,7 @@ Disabled</property>
 		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
 		      <property name="snap_to_ticks">False</property>
 		      <property name="wrap">False</property>
-		      <property name="adjustment">1 1 10000000 1 100 0</property>
+		      <property name="adjustment">1 1 2147483647 1 100 0</property>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -2150,31 +2150,6 @@ Disabled</property>
 		      <property name="fill">False</property>
 		    </packing>
 		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="scrollback-kb-label">
-		      <property name="visible">True</property>
-		      <property name="label">(about 120kB)</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
 		</widget>
 		<packing>
 		  <property name="left_attach">1</property>



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