Drop paint-box option
This commit is contained in:
@@ -21,7 +21,6 @@
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PROP_STEP_SIZE = 1,
|
PROP_STEP_SIZE = 1,
|
||||||
PROP_PAINT_BOX,
|
|
||||||
};
|
};
|
||||||
typedef struct _XtmProcessMonitorClass XtmProcessMonitorClass;
|
typedef struct _XtmProcessMonitorClass XtmProcessMonitorClass;
|
||||||
struct _XtmProcessMonitorClass
|
struct _XtmProcessMonitorClass
|
||||||
@@ -34,7 +33,6 @@ struct _XtmProcessMonitor
|
|||||||
/*<private>*/
|
/*<private>*/
|
||||||
gfloat step_size;
|
gfloat step_size;
|
||||||
GArray * history;
|
GArray * history;
|
||||||
gboolean paint_box;
|
|
||||||
};
|
};
|
||||||
G_DEFINE_TYPE (XtmProcessMonitor, xtm_process_monitor, GTK_TYPE_DRAWING_AREA)
|
G_DEFINE_TYPE (XtmProcessMonitor, xtm_process_monitor, GTK_TYPE_DRAWING_AREA)
|
||||||
|
|
||||||
@@ -60,8 +58,6 @@ xtm_process_monitor_class_init (XtmProcessMonitorClass *klass)
|
|||||||
#endif
|
#endif
|
||||||
g_object_class_install_property (class, PROP_STEP_SIZE,
|
g_object_class_install_property (class, PROP_STEP_SIZE,
|
||||||
g_param_spec_float ("step-size", "StepSize", "Step size", 0.1, G_MAXFLOAT, 1, G_PARAM_CONSTRUCT|G_PARAM_READWRITE));
|
g_param_spec_float ("step-size", "StepSize", "Step size", 0.1, G_MAXFLOAT, 1, G_PARAM_CONSTRUCT|G_PARAM_READWRITE));
|
||||||
g_object_class_install_property (class, PROP_PAINT_BOX,
|
|
||||||
g_param_spec_boolean ("paint-box", "PaintBox", "Paint box around monitor", TRUE, G_PARAM_CONSTRUCT|G_PARAM_READWRITE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -80,10 +76,6 @@ xtm_process_monitor_get_property (GObject *object, guint property_id, GValue *va
|
|||||||
g_value_set_float (value, monitor->step_size);
|
g_value_set_float (value, monitor->step_size);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PAINT_BOX:
|
|
||||||
g_value_set_boolean (value, monitor->paint_box);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
@@ -100,10 +92,6 @@ xtm_process_monitor_set_property (GObject *object, guint property_id, const GVal
|
|||||||
monitor->step_size = g_value_get_float (value);
|
monitor->step_size = g_value_get_float (value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PAINT_BOX:
|
|
||||||
monitor->paint_box = g_value_get_boolean (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
break;
|
break;
|
||||||
@@ -270,12 +258,3 @@ xtm_process_monitor_clear (XtmProcessMonitor *monitor)
|
|||||||
if (GDK_IS_WINDOW (gtk_widget_get_window (GTK_WIDGET(monitor))))
|
if (GDK_IS_WINDOW (gtk_widget_get_window (GTK_WIDGET(monitor))))
|
||||||
gdk_window_invalidate_rect (gtk_widget_get_window (GTK_WIDGET(monitor)), NULL, FALSE);
|
gdk_window_invalidate_rect (gtk_widget_get_window (GTK_WIDGET(monitor)), NULL, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
xtm_process_monitor_set_paint_box (XtmProcessMonitor *monitor, gboolean paint_box)
|
|
||||||
{
|
|
||||||
g_return_if_fail (XTM_IS_PROCESS_MONITOR (monitor));
|
|
||||||
g_object_set (monitor, "paint-box", paint_box, NULL);
|
|
||||||
if (GDK_IS_WINDOW (gtk_widget_get_window (GTK_WIDGET(monitor))))
|
|
||||||
gdk_window_invalidate_rect (gtk_widget_get_window (GTK_WIDGET(monitor)), NULL, FALSE);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ static gboolean emit_delete_event_signal (XtmProcessWindow *window, GdkEvent *
|
|||||||
static gboolean xtm_process_window_key_pressed (XtmProcessWindow *window, GdkEventKey *event);
|
static gboolean xtm_process_window_key_pressed (XtmProcessWindow *window, GdkEventKey *event);
|
||||||
static void toolbar_update_style (XtmProcessWindow *window);
|
static void toolbar_update_style (XtmProcessWindow *window);
|
||||||
static void monitor_update_step_size (XtmProcessWindow *window);
|
static void monitor_update_step_size (XtmProcessWindow *window);
|
||||||
static void monitor_update_paint_box (XtmProcessWindow *window);
|
|
||||||
static void show_about_dialog (XtmProcessWindow *window);
|
static void show_about_dialog (XtmProcessWindow *window);
|
||||||
|
|
||||||
|
|
||||||
@@ -159,8 +158,6 @@ xtm_process_window_init (XtmProcessWindow *window)
|
|||||||
gtk_widget_show (window->mem_monitor);
|
gtk_widget_show (window->mem_monitor);
|
||||||
gtk_container_add (GTK_CONTAINER (toolitem), window->mem_monitor);
|
gtk_container_add (GTK_CONTAINER (toolitem), window->mem_monitor);
|
||||||
|
|
||||||
monitor_update_paint_box (window);
|
|
||||||
g_signal_connect_swapped (window->settings, "notify::monitor-paint-box", G_CALLBACK (monitor_update_paint_box), window);
|
|
||||||
g_signal_connect_swapped (window->settings, "notify::refresh-rate", G_CALLBACK (monitor_update_step_size), window);
|
g_signal_connect_swapped (window->settings, "notify::refresh-rate", G_CALLBACK (monitor_update_step_size), window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,15 +286,6 @@ toolbar_update_style (XtmProcessWindow *window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
monitor_update_paint_box (XtmProcessWindow *window)
|
|
||||||
{
|
|
||||||
gboolean paint_box;
|
|
||||||
g_object_get (window->settings, "monitor-paint-box", &paint_box, NULL);
|
|
||||||
xtm_process_monitor_set_paint_box (XTM_PROCESS_MONITOR (window->cpu_monitor), paint_box);
|
|
||||||
xtm_process_monitor_set_paint_box (XTM_PROCESS_MONITOR (window->mem_monitor), paint_box);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
monitor_update_step_size (XtmProcessWindow *window)
|
monitor_update_step_size (XtmProcessWindow *window)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -123,21 +123,6 @@
|
|||||||
<property name="position">2</property>
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="button-monitor-paint-box">
|
|
||||||
<property name="label" translatable="yes">Draw borders around monitors</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="xalign">0.49000000953674316</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCheckButton" id="button-process-tree">
|
<object class="GtkCheckButton" id="button-process-tree">
|
||||||
<property name="label" translatable="yes">Show processes as tree</property>
|
<property name="label" translatable="yes">Show processes as tree</property>
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ xtm_settings_dialog_init (XtmSettingsDialog *dialog)
|
|||||||
builder_bind_toggle_button (builder, "button-show-application-icons", dialog->settings, "show-application-icons");
|
builder_bind_toggle_button (builder, "button-show-application-icons", dialog->settings, "show-application-icons");
|
||||||
builder_bind_toggle_button (builder, "button-full-command-line", dialog->settings, "full-command-line");
|
builder_bind_toggle_button (builder, "button-full-command-line", dialog->settings, "full-command-line");
|
||||||
builder_bind_toggle_button (builder, "button-more-precision", dialog->settings, "more-precision");
|
builder_bind_toggle_button (builder, "button-more-precision", dialog->settings, "more-precision");
|
||||||
builder_bind_toggle_button (builder, "button-monitor-paint-box", dialog->settings, "monitor-paint-box");
|
|
||||||
builder_bind_toggle_button (builder, "button-prompt-terminate-task", dialog->settings, "prompt-terminate-task");
|
builder_bind_toggle_button (builder, "button-prompt-terminate-task", dialog->settings, "prompt-terminate-task");
|
||||||
builder_bind_toggle_button (builder, "button-show-status-icon", dialog->settings, "show-status-icon");
|
builder_bind_toggle_button (builder, "button-show-status-icon", dialog->settings, "show-status-icon");
|
||||||
builder_bind_toggle_button (builder, "button-show-memory-in-xbytes", dialog->settings, "show-memory-in-xbytes");
|
builder_bind_toggle_button (builder, "button-show-memory-in-xbytes", dialog->settings, "show-memory-in-xbytes");
|
||||||
|
|||||||
@@ -85,21 +85,6 @@
|
|||||||
<property name="position">2</property>
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="button-monitor-paint-box">
|
|
||||||
<property name="label" translatable="yes">Draw borders around monitors</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="xalign">0.49000000953674316</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCheckButton" id="button-process-tree">
|
<object class="GtkCheckButton" id="button-process-tree">
|
||||||
<property name="label" translatable="yes">Show processes as tree</property>
|
<property name="label" translatable="yes">Show processes as tree</property>
|
||||||
|
|||||||
Reference in New Issue
Block a user