[Xfce4-commits] <terminal:master> Remove toolbar editor.
Nick Schermer
noreply at xfce.org
Thu Dec 20 22:16:01 CET 2012
Updating branch refs/heads/master
to 99e272cd9061301942ae64f55d73c5dbe1651def (commit)
from 0206267295327fecbc5ac588d42eda0187b84908 (commit)
commit 99e272cd9061301942ae64f55d73c5dbe1651def
Author: Nick Schermer <nick at xfce.org>
Date: Thu Dec 20 21:47:18 2012 +0100
Remove toolbar editor.
Makefile.am | 1 -
Terminal-toolbars.ui | 36 -------
doc/xfce4-terminal.1.xml | 12 ---
po/POTFILES.in | 2 -
terminal/Makefile.am | 4 -
terminal/terminal-toolbars-model.c | 186 ------------------------------------
terminal/terminal-toolbars-model.h | 61 ------------
terminal/terminal-toolbars-view.c | 127 ------------------------
terminal/terminal-toolbars-view.h | 56 -----------
terminal/terminal-window-ui.xml | 112 ++++++++++++---------
terminal/terminal-window.c | 34 +-------
11 files changed, 65 insertions(+), 566 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index b1eba37..d70f975 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,7 +34,6 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
uidir = $(datadir)/xfce4-terminal
ui_DATA = \
- Terminal-toolbars.ui \
xfce4-terminal.glade
EXTRA_DIST = \
diff --git a/Terminal-toolbars.ui b/Terminal-toolbars.ui
deleted file mode 100644
index 1f1c890..0000000
--- a/Terminal-toolbars.ui
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE toolbars SYSTEM "toolbars.dtd">
-
-<!--
- Copyright (c) 2004-2006 os-cillation
-
- Default toolbar configuration for Terminal.
--->
-
-<toolbars>
- <toolbar name="main" style="both-horiz">
- <toolitem id="new-window" />
- <toolitem id="new-tab" />
-
- <separator />
-
- <toolitem id="copy" />
- <toolitem id="paste" />
-
- <separator />
-
- <toolitem id="fullscreen" />
- <toolitem id="preferences" />
-
- <separator />
-
- <toolitem id="prev-tab" />
- <toolitem id="next-tab" />
-
- <separator />
-
- <toolitem id="contents" />
- </toolbar>
-</toolbars>
-
-<!-- vi:set ts=2 sw=2 ai et: -->
diff --git a/doc/xfce4-terminal.1.xml b/doc/xfce4-terminal.1.xml
index f4df5a7..9de88e5 100644
--- a/doc/xfce4-terminal.1.xml
+++ b/doc/xfce4-terminal.1.xml
@@ -510,18 +510,6 @@
</para>
</listitem>
</varlistentry>
-
- <varlistentry>
- <term><filename>${XDG_DATA_DIRS}/Terminal/Terminal-toolbars.ui</filename></term>
- <listitem>
- <para>
- This file includes the user interface definition for the toolbars. If
- you customize the toolbars using the graphical toolbars editor, &application;
- will store the new toolbars layout in the file
- <filename>${XDG_DATA_HOME}/Terminal/Terminal-toolbars.ui</filename>.
- </para>
- </listitem>
- </varlistentry>
</variablelist>
</refsect1>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0fc53e7..e9d3516 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,8 +10,6 @@ terminal/terminal-preferences-dialog.c
terminal/terminal-preferences.c
terminal/terminal-screen.c
terminal/terminal-shortcut-editor.c
-terminal/terminal-toolbars-model.c
-terminal/terminal-toolbars-view.c
terminal/terminal-widget.c
terminal/terminal-window.c
diff --git a/terminal/Makefile.am b/terminal/Makefile.am
index e6a3eb3..76191f7 100644
--- a/terminal/Makefile.am
+++ b/terminal/Makefile.am
@@ -29,8 +29,6 @@ xfce4_terminal_headers = \
terminal-private.h \
terminal-screen.h \
terminal-shortcut-editor.h \
- terminal-toolbars-model.h \
- terminal-toolbars-view.h \
terminal-widget.h \
terminal-window.h \
terminal-window-ui.h
@@ -50,8 +48,6 @@ xfce4_terminal_SOURCES = \
terminal-preferences-dialog.c \
terminal-screen.c \
terminal-shortcut-editor.c \
- terminal-toolbars-model.c \
- terminal-toolbars-view.c \
terminal-widget.c \
terminal-window.c
diff --git a/terminal/terminal-toolbars-model.c b/terminal/terminal-toolbars-model.c
deleted file mode 100644
index bdadb2f..0000000
--- a/terminal/terminal-toolbars-model.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*-
- * Copyright (c) 2004-2006 os-cillation e.K.
- *
- * Written by Benedikt Meurer <benny 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.
- *
- * The geometry handling code was taken from gnome-terminal. The geometry hacks
- * where initially written by Owen Taylor.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <terminal/terminal-toolbars-model.h>
-
-
-
-static void terminal_toolbars_model_finalize (GObject *object);
-static void terminal_toolbars_model_queue_sync (TerminalToolbarsModel *model);
-static gboolean terminal_toolbars_model_sync (gpointer user_data);
-static void terminal_toolbars_model_sync_destroy (gpointer user_data);
-
-
-
-static const gchar *actions[] =
-{
- "close-tab",
- "close-window",
- "new-tab",
- "new-window",
- "copy",
- "paste",
- "preferences",
- "show-menubar",
- "show-borders",
- "fullscreen",
- "prev-tab",
- "next-tab",
- "reset",
- "reset-and-clear",
- "contents",
- "about",
-};
-
-
-
-G_DEFINE_TYPE (TerminalToolbarsModel, terminal_toolbars_model, EXO_TYPE_TOOLBARS_MODEL)
-
-
-
-static void
-terminal_toolbars_model_class_init (TerminalToolbarsModelClass *klass)
-{
- GObjectClass *gobject_class;
-
- gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->finalize = terminal_toolbars_model_finalize;
-}
-
-
-
-static void
-terminal_toolbars_model_init (TerminalToolbarsModel *model)
-{
- gchar *file;
-
- exo_toolbars_model_set_actions (EXO_TOOLBARS_MODEL (model),
- (gchar **) actions,
- G_N_ELEMENTS (actions));
-
- xfce_resource_push_path (XFCE_RESOURCE_DATA, DATADIR);
- file = xfce_resource_lookup (XFCE_RESOURCE_DATA, "Terminal/Terminal-toolbars.ui");
- xfce_resource_pop_path (XFCE_RESOURCE_DATA);
-
- if (G_LIKELY (file != NULL))
- {
- exo_toolbars_model_load_from_file (EXO_TOOLBARS_MODEL (model), file, NULL);
- g_free (file);
- }
- else
- {
- g_warning ("Unable to locate Terminal/Terminal-toolbars.ui, "
- "the toolbars may not work correctly");
- }
-
- g_signal_connect (G_OBJECT (model), "item-added",
- G_CALLBACK (terminal_toolbars_model_queue_sync), NULL);
- g_signal_connect (G_OBJECT (model), "item-removed",
- G_CALLBACK (terminal_toolbars_model_queue_sync), NULL);
- g_signal_connect (G_OBJECT (model), "toolbar-added",
- G_CALLBACK (terminal_toolbars_model_queue_sync), NULL);
- g_signal_connect (G_OBJECT (model), "toolbar-changed",
- G_CALLBACK (terminal_toolbars_model_queue_sync), NULL);
- g_signal_connect (G_OBJECT (model), "toolbar-removed",
- G_CALLBACK (terminal_toolbars_model_queue_sync), NULL);
-}
-
-
-
-static void
-terminal_toolbars_model_finalize (GObject *object)
-{
- TerminalToolbarsModel *model = TERMINAL_TOOLBARS_MODEL (object);
-
- if (G_UNLIKELY (model->sync_id != 0))
- g_source_remove (model->sync_id);
-
- (*G_OBJECT_CLASS (terminal_toolbars_model_parent_class)->finalize) (object);
-}
-
-
-
-static void
-terminal_toolbars_model_queue_sync (TerminalToolbarsModel *model)
-{
- if (G_LIKELY (model->sync_id == 0))
- {
- model->sync_id = g_timeout_add_seconds_full (G_PRIORITY_LOW, 1, terminal_toolbars_model_sync,
- model, terminal_toolbars_model_sync_destroy);
- }
-}
-
-
-
-static gboolean
-terminal_toolbars_model_sync (gpointer user_data)
-{
- TerminalToolbarsModel *model = TERMINAL_TOOLBARS_MODEL (user_data);
- gchar *file;
-
- file = xfce_resource_save_location (XFCE_RESOURCE_DATA, "Terminal/Terminal-toolbars.ui", TRUE);
- exo_toolbars_model_save_to_file (EXO_TOOLBARS_MODEL (model), file, NULL);
- g_free (file);
-
- return FALSE;
-}
-
-
-
-static void
-terminal_toolbars_model_sync_destroy (gpointer user_data)
-{
- TERMINAL_TOOLBARS_MODEL (user_data)->sync_id = 0;
-}
-
-
-
-/**
- * terminal_toolbars_model_get_default:
- *
- * Return value :
- **/
-ExoToolbarsModel*
-terminal_toolbars_model_get_default (void)
-{
- static ExoToolbarsModel *model = NULL;
-
- if (G_UNLIKELY (model == NULL))
- {
- model = g_object_new (TERMINAL_TYPE_TOOLBARS_MODEL, NULL);
- g_object_add_weak_pointer (G_OBJECT (model), (gpointer) &model);
- }
- else
- {
- g_object_ref (G_OBJECT (model));
- }
-
- return model;
-}
-
-
-
diff --git a/terminal/terminal-toolbars-model.h b/terminal/terminal-toolbars-model.h
deleted file mode 100644
index 0fecc34..0000000
--- a/terminal/terminal-toolbars-model.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-
- * Copyright (c) 2004 os-cillation e.K.
- *
- * Written by Benedikt Meurer <benny 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.
- *
- * The geometry handling code was taken from gnome-terminal. The geometry hacks
- * where initially written by Owen Taylor.
- */
-
-#ifndef __TERMINAL_TOOLBARS_MODEL_H__
-#define __TERMINAL_TOOLBARS_MODEL_H__
-
-#include <exo/exo.h>
-
-G_BEGIN_DECLS
-
-#define TERMINAL_TYPE_TOOLBARS_MODEL (terminal_toolbars_model_get_type ())
-#define TERMINAL_TOOLBARS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TERMINAL_TYPE_TOOLBARS_MODEL, TerminalToolbarsModel))
-#define TERMINAL_TOOLBARS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_TOOLBARS_MODEL, TerminalToolbarsModelClass))
-#define TERMINAL_IS_TOOLBARS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TERMINAL_TYPE_TOOLBARS_MODEL))
-#define TERMINAL_IS_TOOLBARS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_TOOLBARS_MODEL))
-#define TERMINAL_TOOLBARS_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_TOOLBARS_MODEL, TerminalToolbarsModelClass))
-
-typedef struct _TerminalToolbarsModelClass TerminalToolbarsModelClass;
-typedef struct _TerminalToolbarsModel TerminalToolbarsModel;
-
-struct _TerminalToolbarsModelClass
-{
- ExoToolbarsModelClass __parent__;
-};
-
-struct _TerminalToolbarsModel
-{
- ExoToolbarsModel __parent__;
-
- /*< private >*/
- guint sync_id;
-};
-
-
-GType terminal_toolbars_model_get_type (void) G_GNUC_CONST;
-
-ExoToolbarsModel *terminal_toolbars_model_get_default (void);
-
-G_END_DECLS
-
-#endif /* !__TERMINAL_TOOLBARS_MODEL_H__ */
diff --git a/terminal/terminal-toolbars-view.c b/terminal/terminal-toolbars-view.c
deleted file mode 100644
index 2d1d0ad..0000000
--- a/terminal/terminal-toolbars-view.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*-
- * Copyright (c) 2004-2007 os-cillation e.K.
- *
- * Written by Benedikt Meurer <benny 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 <terminal/terminal-private.h>
-#include <terminal/terminal-toolbars-model.h>
-#include <terminal/terminal-toolbars-view.h>
-
-
-
-static void terminal_toolbars_view_finalize (GObject *object);
-static void terminal_toolbars_view_edit_done (ExoToolbarsEditorDialog *dialog,
- TerminalToolbarsView *toolbar);
-
-
-
-G_DEFINE_TYPE (TerminalToolbarsView, terminal_toolbars_view, EXO_TYPE_TOOLBARS_VIEW)
-
-
-
-static void
-terminal_toolbars_view_class_init (TerminalToolbarsViewClass *klass)
-{
- GObjectClass *gobject_class;
-
- gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->finalize = terminal_toolbars_view_finalize;
-}
-
-
-
-static void
-terminal_toolbars_view_init (TerminalToolbarsView *toolbar)
-{
- ExoToolbarsModel *model;
-
- model = terminal_toolbars_model_get_default ();
- exo_toolbars_view_set_model (EXO_TOOLBARS_VIEW (toolbar), model);
- g_object_unref (G_OBJECT (model));
-
- g_signal_connect (G_OBJECT (toolbar), "customize",
- G_CALLBACK (terminal_toolbars_view_edit), NULL);
-}
-
-
-
-static void
-terminal_toolbars_view_finalize (GObject *object)
-{
- TerminalToolbarsView *toolbar = TERMINAL_TOOLBARS_VIEW (object);
-
- if (G_UNLIKELY (toolbar->editor_dialog != NULL))
- gtk_widget_destroy (toolbar->editor_dialog);
-
- (*G_OBJECT_CLASS (terminal_toolbars_view_parent_class)->finalize) (object);
-}
-
-
-
-static void
-terminal_toolbars_view_edit_done (ExoToolbarsEditorDialog *dialog,
- TerminalToolbarsView *toolbar)
-{
- exo_toolbars_view_set_editing (EXO_TOOLBARS_VIEW (toolbar), FALSE);
-}
-
-
-
-/**
- * terminal_toolbars_view_edit:
- * @toolbar : A #TerminalToolbarsView.
- **/
-void
-terminal_toolbars_view_edit (TerminalToolbarsView *toolbar)
-{
- ExoToolbarsModel *model;
- GtkUIManager *ui_manager;
- GtkWidget *toplevel;
-
- terminal_return_if_fail (TERMINAL_IS_TOOLBARS_VIEW (toolbar));
-
- exo_toolbars_view_set_editing (EXO_TOOLBARS_VIEW (toolbar), TRUE);
-
- if (toolbar->editor_dialog == NULL)
- {
- model = exo_toolbars_view_get_model (EXO_TOOLBARS_VIEW (toolbar));
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (toolbar));
- ui_manager = exo_toolbars_view_get_ui_manager (EXO_TOOLBARS_VIEW (toolbar));
-
- toolbar->editor_dialog = exo_toolbars_editor_dialog_new_with_model (ui_manager, model);
- gtk_window_set_destroy_with_parent (GTK_WINDOW (toolbar->editor_dialog), TRUE);
- gtk_window_set_title (GTK_WINDOW (toolbar->editor_dialog), _("Toolbar Editor"));
- gtk_window_set_transient_for (GTK_WINDOW (toolbar->editor_dialog), GTK_WINDOW (toplevel));
- g_signal_connect (G_OBJECT (toolbar->editor_dialog), "destroy",
- G_CALLBACK (terminal_toolbars_view_edit_done), toolbar);
- g_object_add_weak_pointer (G_OBJECT (toolbar->editor_dialog),
- (gpointer) &toolbar->editor_dialog);
- gtk_widget_show (toolbar->editor_dialog);
- }
- else
- {
- gtk_window_present (GTK_WINDOW (toolbar->editor_dialog));
- }
-}
-
-
-
diff --git a/terminal/terminal-toolbars-view.h b/terminal/terminal-toolbars-view.h
deleted file mode 100644
index 4c1bccb..0000000
--- a/terminal/terminal-toolbars-view.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 2004-2005 os-cillation e.K.
- *
- * Written by Benedikt Meurer <benny 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_TOOLBARS_VIEW_H__
-#define __TERMINAL_TOOLBARS_VIEW_H__
-
-#include <exo/exo.h>
-
-G_BEGIN_DECLS
-
-#define TERMINAL_TYPE_TOOLBARS_VIEW (terminal_toolbars_view_get_type ())
-#define TERMINAL_TOOLBARS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TERMINAL_TYPE_TOOLBARS_VIEW, TerminalToolbarsView))
-#define TERMINAL_TOOLBARS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_TOOLBARS_VIEW, TerminalToolbarsViewClass))
-#define TERMINAL_IS_TOOLBARS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TERMINAL_TYPE_TOOLBARS_VIEW))
-#define TERMINAL_IS_TOOLBARS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_TOOLBARS_VIEW))
-#define TERMINAL_TOOLBARS_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_TOOLBARS_VIEW, TerminalToolbarsViewClass))
-
-typedef struct _TerminalToolbarsViewClass TerminalToolbarsViewClass;
-typedef struct _TerminalToolbarsView TerminalToolbarsView;
-
-struct _TerminalToolbarsViewClass
-{
- ExoToolbarsViewClass __parent__;
-};
-
-struct _TerminalToolbarsView
-{
- ExoToolbarsView __parent__;
- GtkWidget *editor_dialog;
-};
-
-
-GType terminal_toolbars_view_get_type (void) G_GNUC_CONST;
-
-void terminal_toolbars_view_edit (TerminalToolbarsView *toolbar);
-
-G_END_DECLS
-
-#endif /* !__TERMINAL_TOOLBAR_H__ */
diff --git a/terminal/terminal-window-ui.xml b/terminal/terminal-window-ui.xml
index 56405d5..f24a017 100644
--- a/terminal/terminal-window-ui.xml
+++ b/terminal/terminal-window-ui.xml
@@ -3,79 +3,95 @@
Copyright (c) 2004-2007 os-cillation
Terminal User Interface description file, parsed by Terminal to create
- the menu bar and the right click menu.
+ the interface.
-->
<!-- The main menu bar -->
<menubar name="main-menu">
<menu action="file-menu">
- <menuitem action="new-tab" />
- <menuitem action="new-window" />
- <separator />
- <menuitem action="detach-tab" />
- <separator />
- <menuitem action="close-tab" />
- <menuitem action="close-window" />
+ <menuitem action="new-tab"/>
+ <menuitem action="new-window"/>
+ <separator/>
+ <menuitem action="detach-tab"/>
+ <separator/>
+ <menuitem action="close-tab"/>
+ <menuitem action="close-window"/>
</menu>
<menu action="edit-menu">
- <menuitem action="copy" />
- <menuitem action="paste" />
- <menuitem action="paste-selection" />
- <separator />
- <menuitem action="select-all" />
- <separator />
- <menuitem action="edit-toolbars" />
- <menuitem action="preferences" />
+ <menuitem action="copy"/>
+ <menuitem action="paste"/>
+ <menuitem action="paste-selection"/>
+ <separator/>
+ <menuitem action="select-all"/>
+ <separator/>
+ <menuitem action="preferences"/>
</menu>
<menu action="view-menu">
- <menuitem action="show-menubar" />
- <menuitem action="show-toolbars" />
- <menuitem action="show-borders" />
- <menuitem action="fullscreen" />
+ <menuitem action="show-menubar"/>
+ <menuitem action="show-toolbars"/>
+ <menuitem action="show-borders"/>
+ <menuitem action="fullscreen"/>
</menu>
<menu action="terminal-menu">
- <menuitem action="set-title" />
- <separator />
- <menuitem action="set-encoding" />
- <separator />
- <menuitem action="reset" />
- <menuitem action="reset-and-clear" />
+ <menuitem action="set-title"/>
+ <separator/>
+ <menuitem action="set-encoding"/>
+ <separator/>
+ <menuitem action="reset"/>
+ <menuitem action="reset-and-clear"/>
</menu>
<menu action="go-menu">
- <menuitem action="prev-tab" />
- <menuitem action="next-tab" />
- <separator />
- <placeholder name="placeholder-tab-items" />
+ <menuitem action="prev-tab"/>
+ <menuitem action="next-tab"/>
+ <separator/>
+ <placeholder name="placeholder-tab-items"/>
</menu>
<menu action="help-menu">
- <menuitem action="contents" />
- <menuitem action="report-bug" />
- <menuitem action="about" />
+ <menuitem action="contents"/>
+ <menuitem action="report-bug"/>
+ <menuitem action="about"/>
</menu>
</menubar>
<!-- The right click menu -->
<popup name="popup-menu">
- <menuitem action="new-window" />
- <menuitem action="new-tab" />
- <separator />
- <menuitem action="copy" />
- <menuitem action="paste" />
- <separator />
- <menuitem action="show-menubar" />
- <menuitem action="fullscreen" />
- <menuitem action="preferences" />
- <separator />
- <menuitem action="input-methods" />
+ <menuitem action="new-window"/>
+ <menuitem action="new-tab"/>
+ <separator/>
+ <menuitem action="copy"/>
+ <menuitem action="paste"/>
+ <separator/>
+ <menuitem action="show-menubar"/>
+ <menuitem action="fullscreen"/>
+ <menuitem action="preferences"/>
+ <separator/>
+ <menuitem action="input-methods"/>
</popup>
<!-- The right click tab menu -->
<popup name="tab-menu">
- <menuitem action="detach-tab" />
- <menuitem action="set-title" />
- <separator />
- <menuitem action="close-tab" />
+ <menuitem action="detach-tab"/>
+ <menuitem action="set-title"/>
+ <separator/>
+ <menuitem action="close-tab"/>
</popup>
+
+ <!-- The toolbar -->
+ <toolbar name="main-toolbar">
+ <toolitem action="new-tab"/>
+ <toolitem action="new-window"/>
+ <separator/>
+ <toolitem action="copy"/>
+ <toolitem action="paste"/>
+ <separator/>
+ <toolitem action="fullscreen"/>
+ <toolitem action="preferences"/>
+ <separator/>
+ <toolitem action="prev-tab"/>
+ <toolitem action="next-tab"/>
+ <separator/>
+ <toolitem action="contents"/>
+ </toolbar>
</ui>
<!--
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 917216b..9378044 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -50,7 +50,6 @@
#include <terminal/terminal-preferences-dialog.h>
#include <terminal/terminal-private.h>
#include <terminal/terminal-marshal.h>
-#include <terminal/terminal-toolbars-view.h>
#include <terminal/terminal-encoding-action.h>
#include <terminal/terminal-window.h>
#include <terminal/terminal-window-ui.h>
@@ -58,15 +57,6 @@
-/* Property identifiers */
-enum
-{
- PROP_0,
- PROP_SHOW_MENUBAR,
- PROP_SHOW_BORDERS,
- PROP_SHOW_TOOLBARS
-};
-
/* Signal identifiers */
enum
{
@@ -160,8 +150,6 @@ static void terminal_window_action_paste_selection (GtkAction
TerminalWindow *window);
static void terminal_window_action_select_all (GtkAction *action,
TerminalWindow *window);
-static void terminal_window_action_edit_toolbars (GtkAction *action,
- TerminalWindow *window);
static void terminal_window_action_prefs (GtkAction *action,
TerminalWindow *window);
static void terminal_window_action_show_menubar (GtkToggleAction *action,
@@ -234,7 +222,6 @@ static const GtkActionEntry action_entries[] =
{ "paste", GTK_STOCK_PASTE, N_ ("_Paste"), NULL, N_ ("Paste from clipboard"), G_CALLBACK (terminal_window_action_paste), },
{ "paste-selection", NULL, N_ ("Paste _Selection"), NULL, N_ ("Paste from primary selection"), G_CALLBACK (terminal_window_action_paste_selection), },
{ "select-all", GTK_STOCK_SELECT_ALL, N_ ("Select _All"), NULL, N_ ("Select all text in the terminal"), G_CALLBACK (terminal_window_action_select_all), },
- { "edit-toolbars", NULL, N_ ("_Toolbars..."), NULL, N_ ("Customize the toolbars"), G_CALLBACK (terminal_window_action_edit_toolbars), },
{ "preferences", GTK_STOCK_PREFERENCES, N_ ("Pr_eferences..."), NULL, N_ ("Open the Terminal preferences dialog"), G_CALLBACK (terminal_window_action_prefs), },
{ "view-menu", NULL, N_ ("_View"), NULL, NULL, NULL, },
{ "terminal-menu", NULL, N_ ("_Terminal"), NULL, NULL, NULL, },
@@ -1370,16 +1357,6 @@ terminal_window_action_select_all (GtkAction *action,
static void
-terminal_window_action_edit_toolbars (GtkAction *action,
- TerminalWindow *window)
-{
- if (G_LIKELY (window->toolbars != NULL))
- terminal_toolbars_view_edit (TERMINAL_TOOLBARS_VIEW (window->toolbars));
-}
-
-
-
-static void
terminal_window_action_prefs (GtkAction *action,
TerminalWindow *window)
{
@@ -1441,7 +1418,6 @@ static void
terminal_window_action_show_toolbars (GtkToggleAction *action,
TerminalWindow *window)
{
- GtkAction *action_edit;
GtkWidget *vbox;
terminal_return_if_fail (GTK_IS_UI_MANAGER (window->ui_manager));
@@ -1451,11 +1427,8 @@ terminal_window_action_show_toolbars (GtkToggleAction *action,
{
if (window->toolbars == NULL)
{
- /* this is a bug in exo, fixed in revision 30359 */
- gtk_ui_manager_ensure_update (window->ui_manager);
-
vbox = gtk_bin_get_child (GTK_BIN (window));
- window->toolbars = g_object_new (TERMINAL_TYPE_TOOLBARS_VIEW, "ui-manager", window->ui_manager, NULL);
+ window->toolbars = gtk_ui_manager_get_widget (window->ui_manager, "/main-toolbar");
gtk_box_pack_start (GTK_BOX (vbox), window->toolbars, FALSE, FALSE, 0);
gtk_box_reorder_child (GTK_BOX (vbox), window->toolbars, window->menubar != NULL ? 1 : 0);
}
@@ -1468,9 +1441,6 @@ terminal_window_action_show_toolbars (GtkToggleAction *action,
window->toolbars = NULL;
}
- action_edit = gtk_action_group_get_action (window->action_group, "edit-toolbars");
- gtk_action_set_sensitive (action_edit, window->toolbars != NULL);
-
terminal_window_set_size (window);
}
@@ -1723,8 +1693,6 @@ terminal_window_new (gboolean fullscreen,
g_object_get (G_OBJECT (window->preferences), "misc-toolbars-default", &setting, NULL);
else
setting = (toolbars == TERMINAL_VISIBILITY_SHOW);
- action = gtk_action_group_get_action (window->action_group, "edit-toolbars");
- gtk_action_set_sensitive (action, FALSE);
action = gtk_action_group_get_action (window->action_group, "show-toolbars");
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), setting);
More information about the Xfce4-commits
mailing list