[Xfce4-commits] <xfce4-terminal:master> Integrate drop-down settings in preferences dialog.

Nick Schermer noreply at xfce.org
Mon Dec 31 11:40:01 CET 2012


Updating branch refs/heads/master
         to 96647092c7ff696a4e58bd3561f6c1e0ee3978f9 (commit)
       from f459ae7ee9402e2430cca24f46146832a4ceb4c5 (commit)

commit 96647092c7ff696a4e58bd3561f6c1e0ee3978f9
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Dec 31 11:38:48 2012 +0100

    Integrate drop-down settings in preferences dialog.
    
    Easier for access. The tab is only shown when opened
    from the drop-down window.

 po/POTFILES.in                                  |    2 -
 po/POTFILES.skip                                |    1 -
 terminal/Makefile.am                            |   11 +-
 terminal/terminal-preferences-dialog.c          |   73 +++-
 terminal/terminal-preferences-dialog.h          |    2 +-
 terminal/terminal-preferences-dropdown-dialog.c |  208 ---------
 terminal/terminal-preferences-dropdown-dialog.h |   42 --
 terminal/terminal-preferences-dropdown.glade    |  560 -----------------------
 terminal/terminal-preferences.glade             |  522 +++++++++++++++++++++-
 terminal/terminal-window-dropdown.c             |   65 +---
 terminal/terminal-window.c                      |    2 +-
 11 files changed, 585 insertions(+), 903 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index c9e7fd9..23bad32 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -13,7 +13,6 @@ terminal/terminal-gdbus.c
 terminal/terminal-image-loader.c
 terminal/terminal-options.c
 terminal/terminal-preferences-dialog.c
-terminal/terminal-preferences-dropdown-dialog.c
 terminal/terminal-preferences.c
 terminal/terminal-screen.c
 terminal/terminal-search-dialog.c
@@ -22,7 +21,6 @@ terminal/terminal-widget.c
 terminal/terminal-window-dropdown.c
 terminal/terminal-window.c
 
-terminal/terminal-preferences-dropdown.glade
 terminal/terminal-preferences.glade
 
 xfce4-terminal.desktop.in
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 4025dfa..d475e86 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,2 +1 @@
 terminal/terminal-preferences.ui
-terminal/terminal-preferences-dropdown.ui
diff --git a/terminal/Makefile.am b/terminal/Makefile.am
index 99c55b0..62c25bd 100644
--- a/terminal/Makefile.am
+++ b/terminal/Makefile.am
@@ -24,7 +24,6 @@ xfce4_terminal_headers = \
 	terminal-options.h \
 	terminal-preferences.h \
 	terminal-preferences-dialog.h \
-	terminal-preferences-dropdown-dialog.h \
 	terminal-search-dialog.h \
 	terminal-private.h \
 	terminal-screen.h \
@@ -44,7 +43,6 @@ xfce4_terminal_SOURCES = \
 	terminal-options.c \
 	terminal-preferences.c \
 	terminal-preferences-dialog.c \
-	terminal-preferences-dropdown-dialog.c \
 	terminal-search-dialog.c \
 	terminal-screen.c \
 	terminal-util.c \
@@ -75,8 +73,7 @@ xfce4_terminal_LDADD = \
 
 uidir = $(datadir)/xfce4/terminal
 ui_DATA = \
-	terminal-preferences.ui \
-	terminal-preferences-dropdown.ui
+	terminal-preferences.ui
 
 ##
 ## Rules to auto-generate built sources
@@ -109,9 +106,6 @@ terminal-window-ui.h: Makefile $(srcdir)/terminal-window-ui.xml
 terminal-preferences.ui: $(srcdir)/terminal-preferences.glade Makefile
 	$(AM_V_GEN) $(XMLLINT) --nonet --noblanks $< > $@ || cat $< > $@
 
-terminal-preferences-dropdown.ui: $(srcdir)/terminal-preferences-dropdown.glade Makefile
-	$(AM_V_GEN) $(XMLLINT) --nonet --noblanks $< > $@ || cat $< > $@
-
 terminal-enum-types.h: stamp-terminal-enum-types.h
 	@true
 stamp-terminal-enum-types.h: terminal-preferences.h Makefile
@@ -164,7 +158,6 @@ EXTRA_DIST = \
 	terminal-config.h.in \
 	terminal-marshal.list \
 	terminal-window-ui.xml \
-	terminal-preferences.glade \
-	terminal-preferences-dropdown.glade
+	terminal-preferences.glade
 
 # vi:set ts=8 sw=8 noet ai nocindent:
diff --git a/terminal/terminal-preferences-dialog.c b/terminal/terminal-preferences-dialog.c
index acf7a7a..b4fff81 100644
--- a/terminal/terminal-preferences-dialog.c
+++ b/terminal/terminal-preferences-dialog.c
@@ -131,12 +131,19 @@ terminal_preferences_dialog_init (TerminalPreferencesDialog *dialog)
                                        "shortcuts-no-mnemonics", "shortcuts-no-menukey",
                                        "binding-backspace", "binding-delete",
                                        "background-mode", "background-image-style",
-                                       "color-background-vary"
+                                       "color-background-vary", "dropdown-keep-open-default",
+                                       "dropdown-keep-above", "dropdown-toggle-focus",
+                                       "dropdown-status-icon", "dropdown-move-to-active",
+                                       "dropdown-always-show-tabs"
                                      };
   const gchar      *props_color[] =  { "color-foreground", "color-cursor",
                                        "color-background", "tab-activity-color",
                                        "color-selection", "color-bold"
                                      };
+  const gchar      *props_value[] =  { "dropdown-height", "dropdown-width",
+                                       "dropdown-position", "dropdown-opacity",
+                                       "dropdown-animation-time"
+                                     };
 
   dialog->preferences = terminal_preferences_get ();
 
@@ -179,6 +186,10 @@ error:
   for (i = 0; i < G_N_ELEMENTS (props_color); i++)
     BIND_PROPERTIES (props_color[i], "color");
 
+  /* bind color properties */
+  for (i = 0; i < G_N_ELEMENTS (props_value); i++)
+    BIND_PROPERTIES (props_value[i], "value");
+
   /* bind color palette properties */
   for (i = 1; i <= 16; i++)
     {
@@ -218,6 +229,12 @@ error:
   g_signal_connect (G_OBJECT (object), "clicked",
       G_CALLBACK (terminal_preferences_dialog_reset_word_chars), dialog);
 
+  /* position scale */
+  object = gtk_builder_get_object (GTK_BUILDER (dialog), "scale-position");
+  terminal_return_if_fail (G_IS_OBJECT (object));
+  for (i = 0; i <= 100; i += 25)
+    gtk_scale_add_mark (GTK_SCALE (object), i, GTK_POS_BOTTOM, NULL);
+
   /* inverted custom colors and set sensitivity */
   object = gtk_builder_get_object (GTK_BUILDER (dialog), "color-selection-custom");
   terminal_return_if_fail (G_IS_OBJECT (object));
@@ -306,14 +323,28 @@ terminal_preferences_dialog_response (GtkWidget                 *widget,
                                       gint                       response,
                                       TerminalPreferencesDialog *dialog)
 {
-  GSList *li;
+  GSList      *li;
+  GObject     *object;
+  GObject     *notebook;
+  const gchar *section;
 
   /* check if we should open the user manual */
   if (G_UNLIKELY (response == 1))
     {
+      /* if the drop-down preferences are shown, we open that page in the wiki */
+      notebook = gtk_builder_get_object (GTK_BUILDER (dialog), "notebook");
+      terminal_return_if_fail (GTK_IS_NOTEBOOK (notebook));
+      object = gtk_builder_get_object (GTK_BUILDER (dialog), "dropdown-box");
+      terminal_return_if_fail (G_IS_OBJECT (object));
+      if (gtk_notebook_page_num (GTK_NOTEBOOK (notebook), GTK_WIDGET (object))
+          == gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)))
+        section = "dropdown";
+      else
+        section = "preferences";
+
       /* open the "Preferences" section of the user manual */
       xfce_dialog_show_help (GTK_WINDOW (widget), "terminal",
-                             "preferences", NULL);
+                             section, NULL);
     }
   else
     {
@@ -505,15 +536,15 @@ terminal_preferences_dialog_presets_changed (GtkComboBox               *combobox
 static void
 terminal_preferences_dialog_presets_load (TerminalPreferencesDialog *dialog)
 {
-  gchar   **presets;
-  guint     n;
-  GObject  *object;
-  guint     n_presets = 0;
-  XfceRc   *rc;
+  gchar       **presets;
+  guint         n;
+  GObject      *object;
+  guint         n_presets = 0;
+  XfceRc       *rc;
   GtkListStore *store;
-  GtkTreeIter iter;
-  const gchar *title;
-  gchar *path;
+  GtkTreeIter   iter;
+  const gchar  *title;
+  gchar        *path;
 
   /* load schemes */
   presets = xfce_resource_match (XFCE_RESOURCE_DATA, "xfce4/terminal/colorschemes/*", TRUE);
@@ -737,13 +768,29 @@ terminal_preferences_dialog_encoding_changed (GtkComboBox               *combobo
  * Return value :
  **/
 GtkWidget*
-terminal_preferences_dialog_new (void)
+terminal_preferences_dialog_new (gboolean show_drop_down)
 {
   GtkBuilder *builder;
   GObject    *dialog;
+  GObject    *object;
+  GObject    *notebook;
 
   builder = g_object_new (TERMINAL_TYPE_PREFERENCES_DIALOG, NULL);
-  dialog = gtk_builder_get_object (builder, "dialog");
 
+  object = gtk_builder_get_object (builder, "dropdown-box");
+  terminal_return_val_if_fail (GTK_IS_WIDGET (object), NULL);
+  gtk_widget_set_visible (GTK_WIDGET (object), show_drop_down);
+
+  if (show_drop_down)
+    {
+      /* focus the drop-down tab if enabled */
+      notebook = gtk_builder_get_object (builder, "notebook");
+      terminal_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), NULL);
+      gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook),
+          gtk_notebook_page_num (GTK_NOTEBOOK (notebook), GTK_WIDGET (object)));
+    }
+
+  dialog = gtk_builder_get_object (builder, "dialog");
+  terminal_return_val_if_fail (XFCE_IS_TITLED_DIALOG (dialog), NULL);
   return GTK_WIDGET (dialog);
 }
diff --git a/terminal/terminal-preferences-dialog.h b/terminal/terminal-preferences-dialog.h
index c30d675..cb4b8c0 100644
--- a/terminal/terminal-preferences-dialog.h
+++ b/terminal/terminal-preferences-dialog.h
@@ -37,7 +37,7 @@ typedef struct _TerminalPreferencesDialog      TerminalPreferencesDialog;
 
 GType      terminal_preferences_dialog_get_type (void) G_GNUC_CONST;
 
-GtkWidget *terminal_preferences_dialog_new      (void);
+GtkWidget *terminal_preferences_dialog_new      (gboolean show_drop_down);
 
 G_END_DECLS
 
diff --git a/terminal/terminal-preferences-dropdown-dialog.c b/terminal/terminal-preferences-dropdown-dialog.c
deleted file mode 100644
index 388452a..0000000
--- a/terminal/terminal-preferences-dropdown-dialog.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/*-
- * Copyright (C) 2012 Nick Schermer <nick at xfce.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <libxfce4ui/libxfce4ui.h>
-
-#include <terminal/terminal-util.h>
-#include <terminal/terminal-enum-types.h>
-#include <terminal/terminal-preferences.h>
-#include <terminal/terminal-preferences-dropdown-dialog.h>
-#include <terminal/terminal-private.h>
-
-
-
-static void terminal_preferences_dropdown_dialog_finalize (GObject                           *object);
-static void terminal_preferences_dropdown_dialog_response (GtkWidget                         *widget,
-                                                           gint                               response,
-                                                           TerminalPreferencesDropdownDialog *dialog);
-
-
-
-struct _TerminalPreferencesDropdownDialogClass
-{
-  GtkBuilderClass __parent__;
-};
-
-struct _TerminalPreferencesDropdownDialog
-{
-  GtkBuilder __parent__;
-
-  TerminalPreferences *preferences;
-  GSList              *bindings;
-};
-
-
-
-G_DEFINE_TYPE (TerminalPreferencesDropdownDialog, terminal_preferences_dropdown_dialog, GTK_TYPE_BUILDER)
-
-
-
-static void
-terminal_preferences_dropdown_dialog_class_init (TerminalPreferencesDropdownDialogClass *klass)
-{
-  GObjectClass *gobject_class;
-
-  gobject_class = G_OBJECT_CLASS (klass);
-  gobject_class->finalize = terminal_preferences_dropdown_dialog_finalize;
-}
-
-
-
-#define BIND_PROPERTIES(name, property) \
-  G_STMT_START { \
-  object = gtk_builder_get_object (GTK_BUILDER (dialog), name); \
-  terminal_return_if_fail (G_IS_OBJECT (object)); \
-  binding = g_object_bind_property (G_OBJECT (dialog->preferences), name, \
-                                    G_OBJECT (object), property, \
-                                    G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL); \
-  dialog->bindings = g_slist_prepend (dialog->bindings, binding); \
-  } G_STMT_END
-
-
-
-static void
-terminal_preferences_dropdown_dialog_init (TerminalPreferencesDropdownDialog *dialog)
-{
-  GError           *error = NULL;
-  guint             i;
-  GObject          *object;
-  gchar            *file;
-  GBinding         *binding;
-  const gchar      *props_active[] = { "dropdown-keep-open-default",
-                                       "dropdown-keep-above",
-                                       "dropdown-toggle-focus",
-                                       "dropdown-status-icon",
-                                       "dropdown-move-to-active",
-                                       "dropdown-always-show-tabs" };
-  const gchar      *props_value[] = { "dropdown-height",
-                                      "dropdown-width",
-                                      "dropdown-position",
-                                      "dropdown-opacity",
-                                      "dropdown-animation-time" };
-
-  dialog->preferences = terminal_preferences_get ();
-
-  /* hack to initialize the XfceTitledDialog class */
-  if (xfce_titled_dialog_get_type () == 0)
-    return;
-
-  /* lookup the ui file */
-  xfce_resource_push_path (XFCE_RESOURCE_DATA, DATADIR);
-  file = xfce_resource_lookup (XFCE_RESOURCE_DATA, "xfce4/terminal/terminal-preferences-dropdown.ui");
-  xfce_resource_pop_path (XFCE_RESOURCE_DATA);
-
-  if (G_UNLIKELY (file == NULL))
-    {
-      g_set_error (&error, 0, 0, "file not found");
-      goto error;
-    }
-
-  /* load the builder data into the object */
-  if (gtk_builder_add_from_file (GTK_BUILDER (dialog), file, &error) == 0)
-    {
-error:
-      g_critical ("Failed to load ui file: %s.", error->message);
-      g_error_free (error);
-      return;
-    }
-
-  /* connect response to dialog */
-  object = gtk_builder_get_object (GTK_BUILDER (dialog), "dialog");
-  terminal_return_if_fail (G_IS_OBJECT (object));
-  g_object_weak_ref (G_OBJECT (object), (GWeakNotify) g_object_unref, dialog);
-  g_signal_connect (G_OBJECT (object), "response",
-      G_CALLBACK (terminal_preferences_dropdown_dialog_response), dialog);
-
-  /* bind active properties */
-  for (i = 0; i < G_N_ELEMENTS (props_active); i++)
-    BIND_PROPERTIES (props_active[i], "active");
-
-  /* bind adjustment properties */
-  for (i = 0; i < G_N_ELEMENTS (props_value); i++)
-    BIND_PROPERTIES (props_value[i], "value");
-
-  object = gtk_builder_get_object (GTK_BUILDER (dialog), "scale-position");
-  terminal_return_if_fail (G_IS_OBJECT (object));
-  for (i = 0; i <= 100; i += 25)
-    gtk_scale_add_mark (GTK_SCALE (object), i, GTK_POS_BOTTOM, NULL);
-}
-
-
-
-static void
-terminal_preferences_dropdown_dialog_finalize (GObject *object)
-{
-  TerminalPreferencesDropdownDialog *dialog = TERMINAL_PREFERENCES_DROPDOWN_DIALOG (object);
-
-  /* release the preferences */
-  g_object_unref (G_OBJECT (dialog->preferences));
-
-  (*G_OBJECT_CLASS (terminal_preferences_dropdown_dialog_parent_class)->finalize) (object);
-}
-
-
-
-static void
-terminal_preferences_dropdown_dialog_response (GtkWidget                         *widget,
-                                               gint                               response,
-                                               TerminalPreferencesDropdownDialog *dialog)
-{
-  GSList *li;
-
-  /* check if we should open the user manual */
-  if (G_UNLIKELY (response == 1))
-    {
-      /* open the "PreferencesDropdown" section of the user manual */
-      xfce_dialog_show_help (GTK_WINDOW (widget), "terminal",
-                             "dropdown", NULL);
-    }
-  else
-    {
-      /* disconnect all the bindings */
-      for (li = dialog->bindings; li != NULL; li = li->next)
-        g_object_unref (G_OBJECT (li->data));
-      g_slist_free (dialog->bindings);
-
-      /* close the preferences dialog */
-      gtk_widget_destroy (widget);
-    }
-}
-
-
-
-/**
- * terminal_preferences_dropdown_dialog_new:
- * @parent      : A #GtkWindow or %NULL.
- *
- * Return value :
- **/
-GtkWidget*
-terminal_preferences_dropdown_dialog_new (void)
-{
-  GtkBuilder *builder;
-  GObject    *dialog;
-
-  builder = g_object_new (TERMINAL_TYPE_PREFERENCES_DROPDOWN_DIALOG, NULL);
-  dialog = gtk_builder_get_object (builder, "dialog");
-
-  return GTK_WIDGET (dialog);
-}
diff --git a/terminal/terminal-preferences-dropdown-dialog.h b/terminal/terminal-preferences-dropdown-dialog.h
deleted file mode 100644
index 659542f..0000000
--- a/terminal/terminal-preferences-dropdown-dialog.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * Copyright (C) 2012 Nick Schermer <nick at xfce.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __TERMINAL_PREFERENCES_DROPDOWN_DROPDOWN_DIALOG_H__
-#define __TERMINAL_PREFERENCES_DROPDOWN_DROPDOWN_DIALOG_H__
-
-#include <terminal/terminal-preferences.h>
-
-G_BEGIN_DECLS
-
-#define TERMINAL_TYPE_PREFERENCES_DROPDOWN_DIALOG            (terminal_preferences_dropdown_dialog_get_type ())
-#define TERMINAL_PREFERENCES_DROPDOWN_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TERMINAL_TYPE_PREFERENCES_DROPDOWN_DIALOG, TerminalPreferencesDropdownDialog))
-#define TERMINAL_PREFERENCES_DROPDOWN_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_PREFERENCES_DROPDOWN_DIALOG, TerminalPreferencesDropdownDialogClass))
-#define TERMINAL_IS_PREFERENCES_DROPDOWN_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TERMINAL_TYPE_PREFERENCES_DROPDOWN_DIALOG))
-#define TERMINAL_IS_PREFERENCES_DROPDOWN_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TERMINAL_TYPE_PREFERENCES_DROPDOWN_DIALOG))
-#define TERMINAL_PREFERENCES_DROPDOWN_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_PREFERENCES_DROPDOWN_DIALOG, TerminalPreferencesDropdownDialogClass))
-
-typedef struct _TerminalPreferencesDropdownDialogClass TerminalPreferencesDropdownDialogClass;
-typedef struct _TerminalPreferencesDropdownDialog      TerminalPreferencesDropdownDialog;
-
-GType      terminal_preferences_dropdown_dialog_get_type (void) G_GNUC_CONST;
-
-GtkWidget *terminal_preferences_dropdown_dialog_new      (void);
-
-G_END_DECLS
-
-#endif /* !__TERMINAL_PREFERENCES_DROPDOWN_DROPDOWN_DIALOG_H__ */
diff --git a/terminal/terminal-preferences-dropdown.glade b/terminal/terminal-preferences-dropdown.glade
deleted file mode 100644
index 3ff64a8..0000000
--- a/terminal/terminal-preferences-dropdown.glade
+++ /dev/null
@@ -1,560 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <requires lib="gtk+" version="2.24"/>
-  <!-- interface-requires libxfce4ui 4.5 -->
-  <!-- interface-naming-policy project-wide -->
-  <object class="GtkAdjustment" id="dropdown-animation-time">
-    <property name="upper">500</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="dropdown-height">
-    <property name="lower">10</property>
-    <property name="upper">100</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="XfceTitledDialog" id="dialog">
-    <property name="can_focus">False</property>
-    <property name="title" translatable="yes">Drop-down Preferences</property>
-    <property name="icon_name">utilities-terminal</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <object class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <child internal-child="action_area">
-          <object class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="button1">
-                <property name="label">gtk-help</property>
-                <property name="use_action_appearance">False</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>
-                <property name="secondary">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="button2">
-                <property name="label">gtk-close</property>
-                <property name="use_action_appearance">False</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">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="border_width">6</property>
-            <property name="spacing">6</property>
-            <child>
-              <object class="GtkFrame" id="frame2">
-                <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="alignment2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <object class="GtkVBox" id="vbox2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="border_width">6</property>
-                        <property name="spacing">6</property>
-                        <child>
-                          <object class="GtkCheckButton" id="dropdown-keep-open-default">
-                            <property name="label" translatable="yes">_Keep window open when it loses focus</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkCheckButton" id="dropdown-keep-above">
-                            <property name="label" translatable="yes">Always keep window on _top</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkCheckButton" id="dropdown-toggle-focus">
-                            <property name="label" translatable="yes">Use shortcut to _focus visible window</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="tooltip_text" translatable="yes">If enabled, the shortcut to open and retract the window will give focus, rather than closing it, if it has previously lost focus</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkCheckButton" id="dropdown-status-icon">
-                            <property name="label" translatable="yes">Show _status icon in notification area</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">3</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label8">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Behavior</property>
-                    <property name="use_markup">True</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkFrame" id="frame1">
-                <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="alignment1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="left_padding">6</property>
-                    <child>
-                      <object class="GtkTable" id="table1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="border_width">6</property>
-                        <property name="n_rows">5</property>
-                        <property name="n_columns">3</property>
-                        <property name="column_spacing">2</property>
-                        <property name="row_spacing">6</property>
-                        <child>
-                          <object class="GtkLabel" id="label5">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Width:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">scale-width</property>
-                          </object>
-                          <packing>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="x_padding">6</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label6">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">He_ight:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">scale-height</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="x_padding">6</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label13">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Opacity:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">scale-opacity</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="x_padding">6</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">D_uration:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">scale-duration</property>
-                          </object>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="x_padding">6</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkHScale" id="scale-height">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">dropdown-height</property>
-                            <property name="round_digits">0</property>
-                            <property name="digits">0</property>
-                            <property name="value_pos">right</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkHScale" id="scale-width">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">dropdown-width</property>
-                            <property name="round_digits">0</property>
-                            <property name="digits">0</property>
-                            <property name="value_pos">right</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkHScale" id="scale-opacity">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">dropdown-opacity</property>
-                            <property name="round_digits">0</property>
-                            <property name="digits">0</property>
-                            <property name="value_pos">right</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkHScale" id="scale-duration">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="adjustment">dropdown-animation-time</property>
-                            <property name="round_digits">0</property>
-                            <property name="digits">0</property>
-                            <property name="value_pos">right</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">ms</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label">%</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label7">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label">%</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="label12">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label">%</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="x_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkCheckButton" id="dropdown-always-show-tabs">
-                            <property name="label" translatable="yes">_Always show tabs</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">4</property>
-                            <property name="bottom_attach">5</property>
-                            <property name="x_padding">6</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label4">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Appearance and Animation</property>
-                    <property name="use_markup">True</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkFrame" id="frame3">
-                <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="alignment3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <object class="GtkVBox" id="vbox3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="border_width">6</property>
-                        <property name="spacing">6</property>
-                        <child>
-                          <object class="GtkHBox" id="hbox1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="spacing">6</property>
-                            <child>
-                              <object class="GtkLabel" id="label10">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
-                                <property name="label" translatable="yes">L_eft</property>
-                                <property name="use_underline">True</property>
-                                <property name="mnemonic_widget">scale-position</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkHScale" id="scale-position">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="adjustment">dropdown-position</property>
-                                <property name="show_fill_level">True</property>
-                                <property name="digits">0</property>
-                                <property name="draw_value">False</property>
-                              </object>
-                              <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="label11">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="xalign">1</property>
-                                <property name="label" translatable="yes">Right</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkCheckButton" id="dropdown-move-to-active">
-                            <property name="label" translatable="yes">Move to monitor with poi_nter</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_underline">True</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label9">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Position</property>
-                    <property name="use_markup">True</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="1">button1</action-widget>
-      <action-widget response="0">button2</action-widget>
-    </action-widgets>
-  </object>
-  <object class="GtkAdjustment" id="dropdown-opacity">
-    <property name="upper">100</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="dropdown-position">
-    <property name="upper">100</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="dropdown-width">
-    <property name="lower">10</property>
-    <property name="upper">100</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-</interface>
diff --git a/terminal/terminal-preferences.glade b/terminal/terminal-preferences.glade
index dcb7b37..ffcef44 100644
--- a/terminal/terminal-preferences.glade
+++ b/terminal/terminal-preferences.glade
@@ -8,6 +8,33 @@
     <property name="step_increment">0.01</property>
     <property name="page_increment">0.10000000000000001</property>
   </object>
+  <object class="GtkAdjustment" id="dropdown-animation-time">
+    <property name="upper">500</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="dropdown-height">
+    <property name="lower">10</property>
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="dropdown-opacity">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="dropdown-position">
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="dropdown-width">
+    <property name="lower">10</property>
+    <property name="upper">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkListStore" id="liststore1">
     <columns>
       <!-- column-name title -->
@@ -194,7 +221,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkNotebook" id="notebook1">
+          <object class="GtkNotebook" id="notebook">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">6</property>
@@ -578,6 +605,483 @@
               </packing>
             </child>
             <child>
+              <object class="GtkVBox" id="dropdown-box">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">6</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkFrame" id="frame10">
+                    <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="alignment24">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox10">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="border_width">6</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkCheckButton" id="dropdown-keep-open-default">
+                                <property name="label" translatable="yes">_Keep window open when it loses focus</property>
+                                <property name="use_action_appearance">False</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="dropdown-keep-above">
+                                <property name="label" translatable="yes">Always keep window on _top</property>
+                                <property name="use_action_appearance">False</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="dropdown-toggle-focus">
+                                <property name="label" translatable="yes">Use shortcut to _focus visible window</property>
+                                <property name="use_action_appearance">False</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="tooltip_text" translatable="yes">If enabled, the shortcut to open and retract the window will give focus, rather than closing it, if it has previously lost focus</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="dropdown-status-icon">
+                                <property name="label" translatable="yes">Show _status icon in notification area</property>
+                                <property name="use_action_appearance">False</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label23">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Behavior</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame16">
+                    <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="alignment25">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="left_padding">6</property>
+                        <child>
+                          <object class="GtkTable" id="table7">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="border_width">6</property>
+                            <property name="n_rows">5</property>
+                            <property name="n_columns">3</property>
+                            <property name="column_spacing">2</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <object class="GtkLabel" id="label36">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Wi_dth:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">scale-width</property>
+                              </object>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="x_padding">6</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label39">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">He_ight:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">scale-height</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="x_padding">6</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label40">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Opacity:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">scale-opacity</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="x_padding">6</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label41">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">D_uration:</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">scale-duration</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="x_padding">6</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHScale" id="scale-height">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">dropdown-height</property>
+                                <property name="round_digits">0</property>
+                                <property name="digits">0</property>
+                                <property name="value_pos">right</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHScale" id="scale-width">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">dropdown-width</property>
+                                <property name="round_digits">0</property>
+                                <property name="digits">0</property>
+                                <property name="value_pos">right</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHScale" id="scale-opacity">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">dropdown-opacity</property>
+                                <property name="round_digits">0</property>
+                                <property name="digits">0</property>
+                                <property name="value_pos">right</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHScale" id="scale-duration">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="adjustment">dropdown-animation-time</property>
+                                <property name="round_digits">0</property>
+                                <property name="digits">0</property>
+                                <property name="value_pos">right</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label42">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">ms</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">2</property>
+                                <property name="right_attach">3</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label43">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label">%</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">2</property>
+                                <property name="right_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label44">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label">%</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">2</property>
+                                <property name="right_attach">3</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label45">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label">%</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">2</property>
+                                <property name="right_attach">3</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="dropdown-always-show-tabs">
+                                <property name="label" translatable="yes">_Always show tabs</property>
+                                <property name="use_action_appearance">False</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="right_attach">3</property>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="x_padding">6</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label46">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Appearance and Animation</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame17">
+                    <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="alignment26">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox15">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="border_width">6</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="spacing">6</property>
+                                <child>
+                                  <object class="GtkLabel" id="label47">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">L_eft</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">scale-position</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHScale" id="scale-position">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">dropdown-position</property>
+                                    <property name="show_fill_level">True</property>
+                                    <property name="digits">0</property>
+                                    <property name="draw_value">False</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label48">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">1</property>
+                                    <property name="label" translatable="yes">Right</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="dropdown-move-to-active">
+                                <property name="label" translatable="yes">Move to monitor with poi_nter</property>
+                                <property name="use_action_appearance">False</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label49">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Position</property>
+                        <property name="use_markup">True</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="label20">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Drop-do_wn</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
               <object class="GtkVBox" id="vbox4">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -1004,7 +1508,7 @@
                 </child>
               </object>
               <packing>
-                <property name="position">1</property>
+                <property name="position">2</property>
               </packing>
             </child>
             <child type="tab">
@@ -1015,7 +1519,7 @@
                 <property name="use_underline">True</property>
               </object>
               <packing>
-                <property name="position">1</property>
+                <property name="position">2</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
@@ -1805,7 +2309,7 @@
                 </child>
               </object>
               <packing>
-                <property name="position">2</property>
+                <property name="position">3</property>
               </packing>
             </child>
             <child type="tab">
@@ -1816,7 +2320,7 @@
                 <property name="use_underline">True</property>
               </object>
               <packing>
-                <property name="position">2</property>
+                <property name="position">3</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
@@ -2009,7 +2513,7 @@ different terminal behavior.</property>
                 </child>
               </object>
               <packing>
-                <property name="position">3</property>
+                <property name="position">4</property>
               </packing>
             </child>
             <child type="tab">
@@ -2020,7 +2524,7 @@ different terminal behavior.</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
-                <property name="position">3</property>
+                <property name="position">4</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
@@ -2269,7 +2773,7 @@ when double clicking:</property>
                 </child>
               </object>
               <packing>
-                <property name="position">4</property>
+                <property name="position">5</property>
               </packing>
             </child>
             <child type="tab">
@@ -2280,7 +2784,7 @@ when double clicking:</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
-                <property name="position">4</property>
+                <property name="position">5</property>
                 <property name="tab_fill">False</property>
               </packing>
             </child>
diff --git a/terminal/terminal-window-dropdown.c b/terminal/terminal-window-dropdown.c
index ed71599..f68c804 100644
--- a/terminal/terminal-window-dropdown.c
+++ b/terminal/terminal-window-dropdown.c
@@ -43,7 +43,6 @@
 #include <terminal/terminal-window.h>
 #include <terminal/terminal-util.h>
 #include <terminal/terminal-window-dropdown.h>
-#include <terminal/terminal-preferences-dropdown-dialog.h>
 
 /* animation fps */
 #define ANIMATION_FPS (1000 / 20)
@@ -87,7 +86,6 @@ static void            terminal_window_dropdown_show                          (T
                                                                                guint32                 timestamp);
 static void            terminal_window_dropdown_toggle_real                   (TerminalWindowDropdown *dropdown,
                                                                                guint32                 timestamp);
-static void            terminal_window_dropdown_preferences                   (TerminalWindowDropdown *dropdown);
 static void            terminal_window_dropdown_update_geometry               (TerminalWindowDropdown *dropdown);
 
 
@@ -127,8 +125,6 @@ struct _TerminalWindowDropdown
   gdouble              rel_height;
   gdouble              rel_position;
 
-  GtkWidget           *preferences_dialog;
-
   GtkStatusIcon       *status_icon;
 
   /* last screen and monitor */
@@ -289,16 +285,18 @@ terminal_window_dropdown_init (TerminalWindowDropdown *dropdown)
   gtk_container_add (GTK_CONTAINER (button), img);
   gtk_widget_show (img);
 
+  action = gtk_action_group_get_action (window->action_group, "preferences");
+
   button = gtk_button_new ();
   gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
-  gtk_widget_set_tooltip_text (button, _("Drop-down Preferences..."));
+  gtk_widget_set_tooltip_text (button, gtk_action_get_tooltip (action));
   gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
   gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
   g_signal_connect_swapped (G_OBJECT (button), "clicked",
-      G_CALLBACK (terminal_window_dropdown_preferences), dropdown);
+      G_CALLBACK (gtk_action_activate), action);
   gtk_widget_show (button);
 
-  img = gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU);
+  img = gtk_action_create_icon (action, GTK_ICON_SIZE_MENU);
   gtk_container_add (GTK_CONTAINER (button), img);
   gtk_widget_show (img);
 
@@ -321,6 +319,7 @@ terminal_window_dropdown_set_property (GObject      *object,
                                        GParamSpec   *pspec)
 {
   TerminalWindowDropdown *dropdown = TERMINAL_WINDOW_DROPDOWN (object);
+  TerminalWindow         *window = TERMINAL_WINDOW (object);
   gdouble                 opacity;
   GdkScreen              *screen;
 
@@ -372,8 +371,8 @@ terminal_window_dropdown_set_property (GObject      *object,
 
     case PROP_DROPDOWN_KEEP_ABOVE:
       gtk_window_set_keep_above (GTK_WINDOW (dropdown), g_value_get_boolean (value));
-      if (dropdown->preferences_dialog != NULL)
-        terminal_util_activate_window (GTK_WINDOW (dropdown->preferences_dialog));
+      if (window->preferences_dialog != NULL)
+        terminal_util_activate_window (GTK_WINDOW (window->preferences_dialog));
       return;
 
     case PROP_DROPDOWN_ANIMATION_TIME:
@@ -535,22 +534,12 @@ terminal_window_dropdown_status_icon_popup_menu (GtkStatusIcon          *status_
   GtkActionGroup *group = TERMINAL_WINDOW (dropdown)->action_group;
   GtkWidget      *menu;
   GtkWidget      *mi;
-  GtkWidget      *image;
   GtkAction      *action;
 
   menu = gtk_menu_new ();
   g_signal_connect (G_OBJECT (menu), "selection-done",
       G_CALLBACK (gtk_widget_destroy), NULL);
 
-  mi = gtk_image_menu_item_new_with_label (_("Drop-down Preferences..."));
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-  g_signal_connect_swapped (G_OBJECT (mi), "activate",
-     G_CALLBACK (terminal_window_dropdown_preferences), dropdown);
-  gtk_widget_show (mi);
-
-  image = gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), image);
-
   action = gtk_action_group_get_action (group, "preferences");
   mi = gtk_action_create_menu_item (action);
   gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
@@ -824,44 +813,6 @@ terminal_window_dropdown_toggle_real (TerminalWindowDropdown *dropdown,
 
 
 static void
-terminal_window_dropdown_preferences_died (gpointer  user_data,
-                                           GObject  *where_the_object_was)
-{
-  TerminalWindowDropdown *dropdown = TERMINAL_WINDOW_DROPDOWN (user_data);
-
-  dropdown->preferences_dialog = NULL;
-  TERMINAL_WINDOW (dropdown)->n_child_windows--;
-
-  terminal_util_activate_window (GTK_WINDOW (dropdown));
-}
-
-
-
-static void
-terminal_window_dropdown_preferences (TerminalWindowDropdown *dropdown)
-{
-  if (dropdown->preferences_dialog == NULL)
-    {
-      dropdown->preferences_dialog = terminal_preferences_dropdown_dialog_new ();
-      if (G_LIKELY (dropdown->preferences_dialog != NULL))
-        {
-          TERMINAL_WINDOW (dropdown)->n_child_windows++;
-          g_object_weak_ref (G_OBJECT (dropdown->preferences_dialog),
-                             terminal_window_dropdown_preferences_died, dropdown);
-        }
-    }
-
-  if (dropdown->preferences_dialog != NULL)
-    {
-      gtk_window_set_transient_for (GTK_WINDOW (dropdown->preferences_dialog), GTK_WINDOW (dropdown));
-      gtk_window_present (GTK_WINDOW (dropdown->preferences_dialog));
-      gtk_window_set_modal (GTK_WINDOW (dropdown->preferences_dialog), TRUE);
-    }
-}
-
-
-
-static void
 terminal_window_dropdown_update_geometry (TerminalWindowDropdown *dropdown)
 {
   terminal_return_if_fail (TERMINAL_IS_WINDOW_DROPDOWN (dropdown));
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 56f07cb..d7b5105 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1358,7 +1358,7 @@ terminal_window_action_prefs (GtkAction      *action,
 {
   if (window->preferences_dialog == NULL)
     {
-      window->preferences_dialog = terminal_preferences_dialog_new ();
+      window->preferences_dialog = terminal_preferences_dialog_new (window->drop_down);
       if (G_LIKELY (window->preferences_dialog != NULL))
         {
           window->n_child_windows++;


More information about the Xfce4-commits mailing list