[krb5-auth-dialog] Adjust header bar usage to the used desktop environment
- From: Guido Günther <guidog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [krb5-auth-dialog] Adjust header bar usage to the used desktop environment
- Date: Mon, 27 Oct 2014 12:59:48 +0000 (UTC)
commit dddaa72bdda80fa7c8ae0bc415ea12603963646f
Author: Guido Günther <agx sigxcpu org>
Date: Mon Oct 27 12:46:18 2014 +0100
Adjust header bar usage to the used desktop environment
src/ka-preferences.c | 10 ++++++++--
src/ka-pwdialog.c | 11 +++++++----
2 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/src/ka-preferences.c b/src/ka-preferences.c
index 85a7da7..344bf7f 100644
--- a/src/ka-preferences.c
+++ b/src/ka-preferences.c
@@ -625,8 +625,14 @@ ka_preferences_class_init (KaPreferencesClass *klass)
KaPreferences*
ka_preferences_new (KaApplet *applet)
{
- KaPreferences *self = g_object_new (KA_TYPE_PREFERENCES,
- "applet", applet, NULL);
+ KaPreferences *self;
+ gboolean use_header;
+
+ g_object_get (gtk_settings_get_default (), "gtk-dialogs-use-header", &use_header, NULL);
+ self = g_object_new (KA_TYPE_PREFERENCES,
+ "applet", applet,
+ "use-header-bar", use_header,
+ NULL);
return self;
}
diff --git a/src/ka-pwdialog.c b/src/ka-pwdialog.c
index 4cd7eb4..005a833 100644
--- a/src/ka-pwdialog.c
+++ b/src/ka-pwdialog.c
@@ -157,11 +157,14 @@ ka_error_dialog_new (void)
KaPwDialog *
ka_pwdialog_new (void)
{
- KaPwDialog *pwdialog = g_object_new (KA_TYPE_PWDIALOG, NULL);
- KaPwDialogPrivate *priv = pwdialog->priv;
+ KaPwDialog *pwdialog;
+ gboolean use_header;
+
+ g_object_get (gtk_settings_get_default (), "gtk-dialogs-use-header", &use_header, NULL);
+ pwdialog = g_object_new (KA_TYPE_PWDIALOG, "use-header-bar", use_header, NULL);
- priv->error_dialog = ka_error_dialog_new ();
- add_password_entry (priv);
+ pwdialog->priv->error_dialog = ka_error_dialog_new ();
+ add_password_entry (pwdialog->priv);
return pwdialog;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]