Simplify settings dialog code
This commit is contained in:
committed by
Simon Steinbeiß
parent
f4e9726e20
commit
1addd38ce3
@@ -15,44 +15,16 @@
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include <libxfce4ui/libxfce4ui.h>
|
||||
|
||||
#include "settings.h"
|
||||
#include "settings-dialog.h"
|
||||
#include "settings-dialog_ui.h"
|
||||
|
||||
|
||||
|
||||
typedef struct _XtmSettingsDialogClass XtmSettingsDialogClass;
|
||||
struct _XtmSettingsDialogClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
};
|
||||
struct _XtmSettingsDialog
|
||||
{
|
||||
GtkWidget parent;
|
||||
/*<private>*/
|
||||
GtkWidget * window;
|
||||
XtmSettings * settings;
|
||||
};
|
||||
G_DEFINE_TYPE (XtmSettingsDialog, xtm_settings_dialog, GTK_TYPE_WIDGET)
|
||||
|
||||
static void xtm_settings_dialog_finalize (GObject *object);
|
||||
static void xtm_settings_dialog_show (GtkWidget *widget);
|
||||
static void xtm_settings_dialog_hide (GtkWidget *widget);
|
||||
static void show_about_dialog (GtkWidget *widget);
|
||||
static GtkWidget *xtm_settings_dialog_new (GtkBuilder *builder, GtkWidget *parent_window);
|
||||
|
||||
|
||||
static void
|
||||
xtm_settings_dialog_class_init (XtmSettingsDialogClass *klass)
|
||||
{
|
||||
GObjectClass *class;
|
||||
GtkWidgetClass *widget_class;
|
||||
xtm_settings_dialog_parent_class = g_type_class_peek_parent (klass);
|
||||
class = G_OBJECT_CLASS (klass);
|
||||
class->finalize = xtm_settings_dialog_finalize;
|
||||
widget_class = GTK_WIDGET_CLASS (klass);
|
||||
widget_class->show = xtm_settings_dialog_show;
|
||||
widget_class->hide = xtm_settings_dialog_hide;
|
||||
}
|
||||
|
||||
static void
|
||||
button_toggled (GtkToggleButton *button, XtmSettings *settings)
|
||||
@@ -76,14 +48,6 @@ builder_bind_toggle_button (GtkBuilder *builder, gchar *widget_name, XtmSettings
|
||||
g_signal_connect (button, "toggled", G_CALLBACK (button_toggled), settings);
|
||||
}
|
||||
|
||||
static void
|
||||
combobox_changed (GtkComboBox *combobox, XtmSettings *settings)
|
||||
{
|
||||
gint active = gtk_combo_box_get_active (combobox);
|
||||
gchar *setting_name = g_object_get_data (G_OBJECT (combobox), "setting-name");
|
||||
g_object_set (settings, setting_name, active, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
show_about_dialog (GtkWidget *widget)
|
||||
{
|
||||
@@ -132,79 +96,46 @@ show_about_dialog (GtkWidget *widget)
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
xtm_settings_dialog_init (XtmSettingsDialog *dialog)
|
||||
static GtkWidget *
|
||||
xtm_settings_dialog_new (GtkBuilder *builder, GtkWidget *parent_window)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *about;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *button;
|
||||
XtmSettings *settings;
|
||||
|
||||
g_object_ref_sink (dialog);
|
||||
|
||||
dialog->settings = xtm_settings_get_default ();
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_string (builder, settings_dialog_ui, settings_dialog_ui_length, NULL);
|
||||
|
||||
dialog->window = GTK_WIDGET (gtk_builder_get_object (builder, "settings-dialog"));
|
||||
settings = xtm_settings_get_default ();
|
||||
dialog = GTK_WIDGET (gtk_builder_get_object (builder, "settings-dialog"));
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent_window));
|
||||
|
||||
#ifndef HAVE_WNCK
|
||||
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "button-show-application-icons")));
|
||||
#endif
|
||||
|
||||
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-more-precision", dialog->settings, "more-precision");
|
||||
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-process-tree", dialog->settings, "process-tree");
|
||||
builder_bind_toggle_button (builder, "button-show-application-icons", settings, "show-application-icons");
|
||||
builder_bind_toggle_button (builder, "button-full-command-line", settings, "full-command-line");
|
||||
builder_bind_toggle_button (builder, "button-more-precision", settings, "more-precision");
|
||||
builder_bind_toggle_button (builder, "button-prompt-terminate-task", settings, "prompt-terminate-task");
|
||||
builder_bind_toggle_button (builder, "button-show-status-icon", settings, "show-status-icon");
|
||||
builder_bind_toggle_button (builder, "button-process-tree", settings, "process-tree");
|
||||
|
||||
about = GTK_WIDGET (gtk_builder_get_object (builder, "button-about"));
|
||||
g_signal_connect_swapped (about, "clicked", G_CALLBACK (show_about_dialog), dialog->window);
|
||||
button = GTK_WIDGET (gtk_builder_get_object (builder, "button-about"));
|
||||
g_signal_connect_swapped (button, "clicked", G_CALLBACK (show_about_dialog), dialog);
|
||||
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
static void
|
||||
xtm_settings_dialog_finalize (GObject *object)
|
||||
{
|
||||
XtmSettingsDialog *dialog = XTM_SETTINGS_DIALOG (object);
|
||||
gtk_widget_destroy (dialog->window);
|
||||
g_object_unref (dialog->settings);
|
||||
}
|
||||
|
||||
|
||||
|
||||
GtkWidget *
|
||||
xtm_settings_dialog_new (GtkWindow *parent_window)
|
||||
{
|
||||
GtkWidget *dialog = g_object_new (XTM_TYPE_SETTINGS_DIALOG, NULL);
|
||||
gtk_window_set_transient_for (GTK_WINDOW (XTM_SETTINGS_DIALOG (dialog)->window), parent_window);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
static void
|
||||
xtm_settings_dialog_show (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (GTK_IS_WIDGET (XTM_SETTINGS_DIALOG (widget)->window));
|
||||
gtk_widget_show (XTM_SETTINGS_DIALOG (widget)->window);
|
||||
gtk_window_present (GTK_WINDOW (XTM_SETTINGS_DIALOG (widget)->window));
|
||||
}
|
||||
|
||||
static void
|
||||
xtm_settings_dialog_hide (GtkWidget *widget)
|
||||
{
|
||||
gint winx, winy;
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
if (!GTK_IS_WIDGET (XTM_SETTINGS_DIALOG (widget)->window))
|
||||
return;
|
||||
gtk_window_get_position (GTK_WINDOW (XTM_SETTINGS_DIALOG (widget)->window), &winx, &winy);
|
||||
gtk_widget_hide (XTM_SETTINGS_DIALOG (widget)->window);
|
||||
gtk_window_move (GTK_WINDOW (XTM_SETTINGS_DIALOG (widget)->window), winx, winy);
|
||||
}
|
||||
|
||||
void
|
||||
xtm_settings_dialog_run (XtmSettingsDialog *dialog)
|
||||
xtm_settings_dialog_run (GtkWidget *parent_window)
|
||||
{
|
||||
gtk_dialog_run (GTK_DIALOG (dialog->window));
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *dialog;
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_string (builder, settings_dialog_ui, settings_dialog_ui_length, NULL);
|
||||
g_return_if_fail (GTK_IS_BUILDER (builder));
|
||||
|
||||
dialog = xtm_settings_dialog_new (builder, parent_window);
|
||||
|
||||
g_object_unref (builder);
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
}
|
||||
|
||||
@@ -17,17 +17,6 @@
|
||||
#include <glib-object.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define XTM_TYPE_SETTINGS_DIALOG (xtm_settings_dialog_get_type ())
|
||||
#define XTM_SETTINGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XTM_TYPE_SETTINGS_DIALOG, XtmSettingsDialog))
|
||||
#define XTM_SETTINGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XTM_TYPE_SETTINGS_DIALOG, XtmSettingsDialogClass))
|
||||
#define XTM_IS_SETTINGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XTM_TYPE_SETTINGS_DIALOG))
|
||||
#define XTM_IS_SETTINGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XTM_TYPE_SETTINGS_DIALOG))
|
||||
#define XTM_SETTINGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XTM_TYPE_SETTINGS_DIALOG, XtmSettingsDialogClass))
|
||||
|
||||
typedef struct _XtmSettingsDialog XtmSettingsDialog;
|
||||
|
||||
GType xtm_settings_dialog_get_type (void);
|
||||
GtkWidget * xtm_settings_dialog_new (GtkWindow *parent_window);
|
||||
void xtm_settings_dialog_run (XtmSettingsDialog *dialog);
|
||||
void xtm_settings_dialog_run (GtkWidget *parent_window);
|
||||
|
||||
#endif /* !SETTINGS_DIALOG_H */
|
||||
|
||||
@@ -19,29 +19,20 @@
|
||||
</object>
|
||||
<object class="GtkDialog" id="settings-dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">Task Manager Settings</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="icon_name">gtk-preferences</property>
|
||||
<property name="type_hint">normal</property>
|
||||
<child type="titlebar">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<property name="icon_name">org.xfce.taskmanager</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox">
|
||||
<property name="visible">True</property>
|
||||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="dialog-action_area">
|
||||
<property name="visible">True</property>
|
||||
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">spread</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<object class="GtkButton" id="button-help">
|
||||
<property name="label" translatable="yes">_Help</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@@ -86,151 +77,239 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook">
|
||||
<object class="GtkBox" id="hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_tabs">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox">
|
||||
<object class="GtkBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox1">
|
||||
<object class="GtkFrame" id="frame-interface">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame-interface">
|
||||
<object class="GtkAlignment" id="alignment-interface">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment-interface">
|
||||
<object class="GtkBox" id="vbox-interface">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox-interface">
|
||||
<object class="GtkCheckButton" id="button-show-application-icons">
|
||||
<property name="label" translatable="yes">Show application icons</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="button-show-application-icons">
|
||||
<property name="label" translatable="yes">Show application icons</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="button-full-command-line">
|
||||
<property name="label" translatable="yes">Show full command lines</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="button-more-precision">
|
||||
<property name="label" translatable="yes">Show values with more precision</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="button-process-tree">
|
||||
<property name="label" translatable="yes">Show processes as tree</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="button-full-command-line">
|
||||
<property name="label" translatable="yes">Show full command lines</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="button-more-precision">
|
||||
<property name="label" translatable="yes">Show values with more precision</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="button-process-tree">
|
||||
<property name="label" translatable="yes">Show processes as tree</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label-interface">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes"><b>Interface style</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame-misc">
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label-interface">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="label" translatable="yes"><b>Interface style</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame-misc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment-misc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment-misc">
|
||||
<object class="GtkBox" id="vbox-misc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox-misc">
|
||||
<object class="GtkCheckButton" id="button-prompt-terminate-task">
|
||||
<property name="label" translatable="yes">Prompt for terminating tasks</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="button-show-status-icon">
|
||||
<property name="label" translatable="yes">Hide into the notification area</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label-misc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes"><b>Miscellaneous</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator" id="vseparator1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox2">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame-information">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment-information">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox-information">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox-refresh-rate">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="button-prompt-terminate-task">
|
||||
<property name="label" translatable="yes">Prompt for terminating tasks</property>
|
||||
<object class="GtkLabel" id="label-refresh-rate">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Refresh rate:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -239,13 +318,9 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="button-show-status-icon">
|
||||
<property name="label" translatable="yes">Hide into the notification area</property>
|
||||
<object class="GtkComboBox" id="combobox-refresh-rate">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -254,23 +329,66 @@
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label-columns">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Columns:</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment-columns">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow-columns">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="vscrollbar_policy">never</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview-columns">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection1"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label-misc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes"><b>Miscellaneous</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label-information">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes"><b>Information</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -279,170 +397,13 @@
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator" id="vseparator1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox2">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame-information">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment-information">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox-information">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox-refresh-rate">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label-refresh-rate">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Refresh rate:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="combobox-refresh-rate">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label-columns">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Columns:</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment-columns">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow-columns">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="vscrollbar_policy">never</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview-columns">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection1"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label-information">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes"><b>Information</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Settings</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab_fill">False</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
||||
@@ -65,9 +65,8 @@ static void
|
||||
show_settings_dialog (XtmSettingsToolButton *button)
|
||||
{
|
||||
GtkWidget *parent_window = gtk_widget_get_ancestor (GTK_WIDGET (button), GTK_TYPE_WINDOW);
|
||||
GtkWidget *dialog = xtm_settings_dialog_new (GTK_WINDOW (parent_window));
|
||||
xtm_settings_dialog_run (XTM_SETTINGS_DIALOG (dialog));
|
||||
g_object_unref (dialog);
|
||||
|
||||
xtm_settings_dialog_run (parent_window);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -100,8 +100,6 @@ xtm_settings_class_init (XtmSettingsClass *klass)
|
||||
g_param_spec_boolean ("monitor-paint-box", "MonitorPaintBox", "Paint box around monitor", TRUE, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (class, PROP_SHOW_APPLICATION_ICONS,
|
||||
g_param_spec_boolean ("show-application-icons", "ShowApplicationIcons", "Show application icons", TRUE, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (class, PROP_TOOLBAR_STYLE,
|
||||
g_param_spec_enum ("toolbar-style", "ToolbarStyle", "Toolbar style", XTM_TYPE_TOOLBAR_STYLE, XTM_TOOLBAR_STYLE_DEFAULT, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (class, PROP_PROMPT_TERMINATE_TASK,
|
||||
g_param_spec_boolean ("prompt-terminate-task", "PromptTerminateTask", "Prompt dialog for terminating a task", TRUE, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (class, PROP_REFRESH_RATE,
|
||||
|
||||
Reference in New Issue
Block a user