[Xfce4-commits] <xfwm4:master> Connect help buttons to docs.xfce.org.
Nick Schermer
noreply at xfce.org
Sun Jan 8 12:08:01 CET 2012
Updating branch refs/heads/master
to ba7cbbe7042c7fc58b4f6c798f25353254d1636d (commit)
from ab9d23272da5ecff217cd153fcf1f31d07069c67 (commit)
commit ba7cbbe7042c7fc58b4f6c798f25353254d1636d
Author: Nick Schermer <nick at xfce.org>
Date: Sun Jan 8 12:05:40 2012 +0100
Connect help buttons to docs.xfce.org.
configure.ac.in | 2 +-
settings-dialogs/tweaks-settings.c | 17 ++++-
settings-dialogs/workspace-settings.c | 26 +++++--
settings-dialogs/xfwm4-dialog.glade | 4 +-
settings-dialogs/xfwm4-settings.c | 19 +++++-
settings-dialogs/xfwm4-tweaks-dialog.glade | 4 +-
settings-dialogs/xfwm4-workspace-dialog.glade | 103 +------------------------
7 files changed, 60 insertions(+), 115 deletions(-)
diff --git a/configure.ac.in b/configure.ac.in
index 53eda32..88bf37e 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -12,7 +12,7 @@ m4_define([xfwm4_version], [xfwm4_version_major().xfwm4_version_minor().xfwm4_ve
m4_define([gtk_minimum_version], [2.14.0])
m4_define([xfce_minimum_version], [4.8.0])
-m4_define([libxfce4ui_minimum_version], [4.8.0])
+m4_define([libxfce4ui_minimum_version], [4.9.0])
m4_define([libxfce4kbd_private_minimum_version], [4.8.0])
m4_define([xfconf_minimum_version], [4.8.0])
m4_define([xcomposite_minimum_version], [0.2])
diff --git a/settings-dialogs/tweaks-settings.c b/settings-dialogs/tweaks-settings.c
index 4442ba2..470bcea 100644
--- a/settings-dialogs/tweaks-settings.c
+++ b/settings-dialogs/tweaks-settings.c
@@ -416,6 +416,21 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder)
g_free (activate_action);
}
+static void
+wm_tweaks_dialog_response (GtkWidget *dialog,
+ gint response_id)
+{
+ if (response_id == GTK_RESPONSE_HELP)
+ {
+ xfce_dialog_show_help (GTK_WINDOW (dialog), "xfwm4",
+ "wmtweaks", NULL);
+ }
+ else
+ {
+ gtk_main_quit ();
+ }
+}
+
static GOptionEntry entries[] =
{
{ "socket-id", 's', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT, &opt_socket_id, N_ ("Session manager socket"), N_ ("SOCKET ID") },
@@ -477,7 +492,7 @@ main (int argc, gchar **argv)
{
dialog = GTK_WIDGET (gtk_builder_get_object (builder, "main-dialog"));
gtk_widget_show (dialog);
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (dialog, "response", G_CALLBACK (wm_tweaks_dialog_response), NULL);
/* To prevent the settings dialog to be saved in the session */
gdk_set_sm_client_id ("FAKE ID");
diff --git a/settings-dialogs/workspace-settings.c b/settings-dialogs/workspace-settings.c
index 3313045..856c3ca 100644
--- a/settings-dialogs/workspace-settings.c
+++ b/settings-dialogs/workspace-settings.c
@@ -248,18 +248,12 @@ static void
workspace_dialog_setup_names_treeview(GtkBuilder *builder,
XfconfChannel *channel)
{
- GtkWidget *treeview, *dialog;
+ GtkWidget *treeview;
GtkListStore *ls;
GtkCellRenderer *render;
GtkTreeViewColumn *col;
WnckScreen *screen;
- dialog = GTK_WIDGET (gtk_builder_get_object(builder, "change_name_dialog"));
- g_object_set_data(G_OBJECT(dialog), "name-entry",
- GTK_WIDGET (gtk_builder_get_object(builder, "entry_name")));
- g_signal_connect(G_OBJECT(dialog), "delete-event",
- G_CALLBACK(gtk_true), NULL);
-
treeview = GTK_WIDGET (gtk_builder_get_object(builder, "treeview_ws_names"));
ls = gtk_list_store_new(N_COLS, G_TYPE_INT, G_TYPE_STRING);
@@ -365,6 +359,22 @@ workspace_dialog_configure_widgets (GtkBuilder *builder,
}
+static void
+workspace_dialog_response (GtkWidget *dialog,
+ gint response_id)
+{
+ if (response_id == GTK_RESPONSE_HELP)
+ {
+ xfce_dialog_show_help (GTK_WINDOW (dialog), "xfwm4",
+ "workspaces", NULL);
+ }
+ else
+ {
+ gtk_main_quit ();
+ }
+}
+
+
static GOptionEntry entries[] =
{
{ "socket-id", 's', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT, &opt_socket_id, N_("Settings manager socket"), N_("SOCKET ID") },
@@ -421,7 +431,7 @@ main(int argc, gchar **argv)
if(opt_socket_id == 0) {
dialog = GTK_WIDGET (gtk_builder_get_object (builder, "main-dialog"));
gtk_widget_show (dialog);
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (dialog, "response", G_CALLBACK (workspace_dialog_response), NULL);
/* To prevent the settings dialog to be saved in the session */
gdk_set_sm_client_id ("FAKE ID");
diff --git a/settings-dialogs/xfwm4-dialog.glade b/settings-dialogs/xfwm4-dialog.glade
index 65677f6..d506222 100644
--- a/settings-dialogs/xfwm4-dialog.glade
+++ b/settings-dialogs/xfwm4-dialog.glade
@@ -1272,7 +1272,7 @@
<object class="GtkButton" id="help_button">
<property name="label">gtk-help</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
+ <property name="sensitive">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
@@ -1308,7 +1308,7 @@
</object>
</child>
<action-widgets>
- <action-widget response="0">help_button</action-widget>
+ <action-widget response="-11">help_button</action-widget>
<action-widget response="0">close_button</action-widget>
</action-widgets>
</object>
diff --git a/settings-dialogs/xfwm4-settings.c b/settings-dialogs/xfwm4-settings.c
index e916439..4528099 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -926,6 +926,23 @@ xfwm_settings_create_plug (XfwmSettings *settings,
+static void
+xfwm_settings_response (GtkWidget *dialog,
+ gint response_id)
+{
+ if (response_id == GTK_RESPONSE_HELP)
+ {
+ xfce_dialog_show_help (GTK_WINDOW (dialog), "xfwm4",
+ "preferences", NULL);
+ }
+ else
+ {
+ gtk_main_quit ();
+ }
+}
+
+
+
int
main (int argc,
char **argv)
@@ -989,7 +1006,7 @@ main (int argc,
{
dialog = xfwm_settings_create_dialog (settings);
gtk_widget_show (dialog);
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (dialog, "response", G_CALLBACK (xfwm_settings_response), NULL);
/* To prevent the settings dialog to be saved in the session */
gdk_set_sm_client_id ("FAKE ID");
diff --git a/settings-dialogs/xfwm4-tweaks-dialog.glade b/settings-dialogs/xfwm4-tweaks-dialog.glade
index a9e91ee..eb20956 100644
--- a/settings-dialogs/xfwm4-tweaks-dialog.glade
+++ b/settings-dialogs/xfwm4-tweaks-dialog.glade
@@ -1135,7 +1135,7 @@ when switching via keyboard shortcuts</property>
<object class="GtkButton" id="button2">
<property name="label">gtk-help</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
+ <property name="sensitive">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
@@ -1171,7 +1171,7 @@ when switching via keyboard shortcuts</property>
</object>
</child>
<action-widgets>
- <action-widget response="0">button2</action-widget>
+ <action-widget response="-11">button2</action-widget>
<action-widget response="0">button1</action-widget>
</action-widgets>
</object>
diff --git a/settings-dialogs/xfwm4-workspace-dialog.glade b/settings-dialogs/xfwm4-workspace-dialog.glade
index 89fe9a1..6387b69 100644
--- a/settings-dialogs/xfwm4-workspace-dialog.glade
+++ b/settings-dialogs/xfwm4-workspace-dialog.glade
@@ -307,7 +307,7 @@
<object class="GtkButton" id="button2">
<property name="label">gtk-help</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
+ <property name="sensitive">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
@@ -316,6 +316,7 @@
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
+ <property name="secondary">True</property>
</packing>
</child>
<child>
@@ -343,106 +344,8 @@
</object>
</child>
<action-widgets>
- <action-widget response="0">button2</action-widget>
+ <action-widget response="-11">button2</action-widget>
<action-widget response="0">button1</action-widget>
</action-widgets>
</object>
- <object class="XfceTitledDialog" id="change_name_dialog">
- <property name="title" translatable="yes">Change workspace name</property>
- <property name="resizable">False</property>
- <property name="window_position">center-on-parent</property>
- <property name="destroy_with_parent">True</property>
- <property name="icon_name">xfce4-workspaces</property>
- <property name="type_hint">dialog</property>
- <property name="skip_taskbar_hint">True</property>
- <property name="transient_for">main-dialog</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Name:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">entry_name</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entry_name">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
- <property name="width_chars">16</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button3">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button4">
- <property name="label">gtk-save</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</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="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">button3</action-widget>
- <action-widget response="0">button4</action-widget>
- </action-widgets>
- </object>
</interface>
More information about the Xfce4-commits
mailing list