[gnome-system-monitor] Stock items deprecation and cleanup



commit 21db050277fd2d5a107eb029506c5e855477ee7c
Author: Robert Roth <robert roth off gmail com>
Date:   Sat Jul 6 02:42:10 2013 +0300

    Stock items deprecation and cleanup

 src/interface.cpp      |    2 +-
 src/procdialogs.cpp    |    2 +-
 src/procproperties.cpp |   51 +-----------------------------------------------
 3 files changed, 3 insertions(+), 52 deletions(-)
---
diff --git a/src/interface.cpp b/src/interface.cpp
index c116cf5..f80cf5e 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -58,7 +58,7 @@ static const GtkActionEntry menu_entries[] =
     { "ChangePriority", NULL, N_("_Change Priority"), NULL,
       N_("Change the order of priority of process"), NULL },
 
-    { "Refresh", GTK_STOCK_REFRESH, N_("_Refresh"), "<control>R",
+    { "Refresh", NULL, N_("_Refresh"), "<control>R",
       N_("Refresh the process list"), G_CALLBACK(cb_user_refresh) },
 
     { "MemoryMaps", NULL, N_("_Memory Maps"), "<control>M",
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp
index 4a54b72..e02177b 100644
--- a/src/procdialogs.cpp
+++ b/src/procdialogs.cpp
@@ -105,7 +105,7 @@ procdialog_create_kill_dialog (ProcmanApp *app, int signal)
                                               secondary);
 
     gtk_dialog_add_buttons (GTK_DIALOG (kill_alert_dialog),
-                            GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                            _("_Cancel"), GTK_RESPONSE_CANCEL,
                             button_text, GTK_RESPONSE_OK,
                             NULL);
 
diff --git a/src/procproperties.cpp b/src/procproperties.cpp
index 36c19a3..ab7058c 100644
--- a/src/procproperties.cpp
+++ b/src/procproperties.cpp
@@ -48,55 +48,6 @@ typedef struct _proc_arg {
     gchar *val;
 } proc_arg;
 
-static void
-get_process_memory_writable (ProcInfo *info)
-{
-    glibtop_proc_map buf;
-    glibtop_map_entry *maps;
-
-    maps = glibtop_get_proc_map(&buf, info->pid);
-
-    gulong memwritable = 0;
-    const unsigned number = buf.number;
-
-    for (unsigned i = 0; i < number; ++i) {
-#ifdef __linux__
-        memwritable += maps[i].private_dirty;
-#else
-        if (maps[i].perm & GLIBTOP_MAP_PERM_WRITE)
-            memwritable += maps[i].size;
-#endif
-    }
-
-    info->memwritable = memwritable;
-
-    g_free(maps);
-}
-
-static void
-get_process_memory_info (ProcInfo *info)
-{
-    glibtop_proc_mem procmem;
-    WnckResourceUsage xresources;
-
-    wnck_pid_read_resource_usage (gdk_screen_get_display (gdk_screen_get_default ()),
-                                  info->pid,
-                                  &xresources);
-
-    glibtop_get_proc_mem(&procmem, info->pid);
-
-    info->vmsize       = procmem.vsize;
-    info->memres       = procmem.resident;
-    info->memshared    = procmem.share;
-
-    info->memxserver = xresources.total_bytes_estimate;
-
-    get_process_memory_writable(info);
-
-    // fake the smart memory column if writable is not available
-    info->mem = info->memxserver + (info->memwritable ? info->memwritable : info->memres);
-}
-
 static gchar*
 format_memsize(guint64 size)
 {
@@ -257,7 +208,7 @@ create_single_procproperties_dialog (GtkTreeModel *model, GtkTreePath *path,
 
     procpropdialog = gtk_dialog_new_with_buttons (_("Process Properties"), NULL,
                                                   GTK_DIALOG_DESTROY_WITH_PARENT,
-                                                  GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+                                                  _("_Close"), GTK_RESPONSE_CLOSE,
                                                   NULL);
     gtk_window_set_resizable (GTK_WINDOW (procpropdialog), TRUE);
     gtk_window_set_default_size (GTK_WINDOW (procpropdialog), 575, 400);



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