summaryrefslogtreecommitdiff
path: root/cut-n-paste
diff options
context:
space:
mode:
Diffstat (limited to 'cut-n-paste')
-rw-r--r--cut-n-paste/meson.build1
-rw-r--r--cut-n-paste/toolbar-editor/egg-editable-toolbar.c39
-rw-r--r--cut-n-paste/toolbar-editor/egg-toolbar-editor.c1
-rw-r--r--cut-n-paste/toolbar-editor/egg-toolbar-editor.h2
-rw-r--r--cut-n-paste/toolbar-editor/egg-toolbars-model.c4
-rw-r--r--cut-n-paste/toolbar-editor/meson.build27
6 files changed, 49 insertions, 25 deletions
diff --git a/cut-n-paste/meson.build b/cut-n-paste/meson.build
new file mode 100644
index 0000000..db067e9
--- /dev/null
+++ b/cut-n-paste/meson.build
@@ -0,0 +1 @@
+subdir('toolbar-editor')
diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
index c059ee5..6ed923f 100644
--- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
+++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
@@ -468,11 +468,9 @@ configure_item_cursor (GtkToolItem *item,
}
if (icon_name)
{
- GdkScreen *screen;
GtkIconTheme *icon_theme;
gint width, height;
- screen = gtk_widget_get_screen (widget);
icon_theme = gtk_icon_theme_get_for_screen (screen);
if (!gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR,
@@ -508,7 +506,6 @@ configure_item_cursor (GtkToolItem *item,
}
}
-
static void
configure_item_tooltip (GtkToolItem *item)
{
@@ -524,7 +521,6 @@ configure_item_tooltip (GtkToolItem *item)
}
}
-
static void
connect_widget_signals (GtkWidget *proxy, EggEditableToolbar *etoolbar)
{
@@ -858,7 +854,7 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar)
{
EggEditableToolbarPrivate *priv = etoolbar->priv;
gint n_toolbars, n_items, i, j, k;
- GtkToggleAction *action;
+ GtkToggleAction *toggle_action;
GList *list;
GString *string;
gboolean showing;
@@ -951,27 +947,28 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar)
if (i >= priv->visibility_actions->len)
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- action = gtk_toggle_action_new (action_name, action_label, NULL, NULL);
+ toggle_action = gtk_toggle_action_new (action_name, action_label, NULL, NULL);
G_GNUC_END_IGNORE_DEPRECATIONS;
- g_ptr_array_add (priv->visibility_actions, action);
- g_signal_connect_object (action, "toggled",
+ g_ptr_array_add (priv->visibility_actions, toggle_action);
+ g_signal_connect_object (toggle_action, "toggled",
G_CALLBACK (toggled_visibility_cb),
etoolbar, 0);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- gtk_action_group_add_action (priv->actions, GTK_ACTION (action));
- G_GNUC_END_IGNORE_DEPRECATIONS;
+ gtk_action_group_add_action (priv->actions, GTK_ACTION (toggle_action));
+ G_GNUC_END_IGNORE_DEPRECATIONS;
}
else
{
- action = g_ptr_array_index (priv->visibility_actions, i);
- g_object_set (action, "label", action_label, NULL);
+ toggle_action = g_ptr_array_index (priv->visibility_actions, i);
+ g_object_set (toggle_action, "label", action_label, NULL);
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- gtk_action_set_visible (GTK_ACTION (action), (egg_toolbars_model_get_flags (priv->model, i)
- & EGG_TB_MODEL_NOT_REMOVABLE) == 0);
- gtk_action_set_sensitive (GTK_ACTION (action), showing);
- gtk_toggle_action_set_active (action, gtk_widget_get_visible
+ gtk_action_set_visible (GTK_ACTION (toggle_action),
+ (egg_toolbars_model_get_flags (priv->model, i)
+ & EGG_TB_MODEL_NOT_REMOVABLE) == 0);
+ gtk_action_set_sensitive (GTK_ACTION (toggle_action), showing);
+ gtk_toggle_action_set_active (toggle_action, gtk_widget_get_visible
(get_dock_nth (etoolbar, i)));
G_GNUC_END_IGNORE_DEPRECATIONS;
@@ -989,10 +986,10 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar)
while (i < priv->visibility_actions->len)
{
- action = g_ptr_array_index (priv->visibility_actions, i);
+ toggle_action = g_ptr_array_index (priv->visibility_actions, i);
g_ptr_array_remove_index_fast (priv->visibility_actions, i);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- gtk_action_group_remove_action (priv->actions, GTK_ACTION (action));
+ gtk_action_group_remove_action (priv->actions, GTK_ACTION (toggle_action));
G_GNUC_END_IGNORE_DEPRECATIONS;
i++;
}
@@ -1108,12 +1105,14 @@ static void
update_fixed (EggEditableToolbar *etoolbar)
{
GtkWidget *toolbar, *dock;
- if (!etoolbar->priv->fixed_toolbar) return;
+
+ if (!etoolbar->priv->fixed_toolbar)
+ return;
toolbar = etoolbar->priv->fixed_toolbar;
dock = get_dock_nth (etoolbar, 0);
- if (dock && toolbar && gtk_widget_get_parent (toolbar) == NULL)
+ if (dock && gtk_widget_get_parent (toolbar) == NULL)
{
gtk_box_pack_end (GTK_BOX (dock), toolbar, FALSE, TRUE, 0);
diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
index d852f86..acc72e7 100644
--- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
+++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
@@ -36,7 +36,6 @@ static const GtkTargetEntry source_drag_types[] = {
{EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0},
};
-
static void egg_toolbar_editor_finalize (GObject *object);
static void update_editor_sheet (EggToolbarEditor *editor);
diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.h b/cut-n-paste/toolbar-editor/egg-toolbar-editor.h
index 89bb185..d9f8786 100644
--- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.h
+++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.h
@@ -34,7 +34,6 @@ typedef struct EggToolbarEditorClass EggToolbarEditorClass;
#define EGG_IS_TOOLBAR_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TOOLBAR_EDITOR))
#define EGG_TOOLBAR_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditorClass))
-
typedef struct EggToolbarEditor EggToolbarEditor;
typedef struct EggToolbarEditorPrivate EggToolbarEditorPrivate;
@@ -51,7 +50,6 @@ struct EggToolbarEditorClass
GtkVBoxClass parent_class;
};
-
GType egg_toolbar_editor_get_type (void);
GtkWidget *egg_toolbar_editor_new (GtkUIManager *manager,
EggToolbarsModel *model);
diff --git a/cut-n-paste/toolbar-editor/egg-toolbars-model.c b/cut-n-paste/toolbar-editor/egg-toolbars-model.c
index 78bf829..cdd340e 100644
--- a/cut-n-paste/toolbar-editor/egg-toolbars-model.c
+++ b/cut-n-paste/toolbar-editor/egg-toolbars-model.c
@@ -27,6 +27,8 @@
#include <unistd.h>
#include <string.h>
+#include <libxml/globals.h>
+#include <libxml/parser.h>
#include <libxml/tree.h>
#include <gdk/gdk.h>
@@ -213,7 +215,6 @@ is_unique (EggToolbarsModel *model,
EggToolbarsItem *idata2;
GNode *toolbar, *item;
-
for(toolbar = g_node_first_child (model->priv->toolbars);
toolbar != NULL; toolbar = g_node_next_sibling (toolbar))
{
@@ -330,7 +331,6 @@ egg_toolbars_model_set_flags (EggToolbarsModel *model,
0, toolbar_position);
}
-
char *
egg_toolbars_model_get_data (EggToolbarsModel *model,
GdkAtom type,
diff --git a/cut-n-paste/toolbar-editor/meson.build b/cut-n-paste/toolbar-editor/meson.build
new file mode 100644
index 0000000..3295507
--- /dev/null
+++ b/cut-n-paste/toolbar-editor/meson.build
@@ -0,0 +1,27 @@
+eggheaders = [
+ 'egg-editable-toolbar.h',
+ 'egg-toolbars-model.h',
+ 'egg-toolbar-editor.h',
+]
+
+eggmarshalers = gnome.genmarshal('eggmarshalers', sources: ['eggmarshalers.list'], prefix: '_egg_marshal')
+eggtypebuiltins = gnome.mkenums_simple('eggtypebuiltins', sources: eggheaders)
+
+src = [
+ eggmarshalers,
+ eggtypebuiltins,
+ 'egg-editable-toolbar.c',
+ 'egg-toolbars-model.c',
+ 'egg-toolbar-editor.c',
+ eggheaders,
+]
+
+toolbareditor = static_library(
+ 'toolbareditor',
+ src,
+ dependencies: all_deps,
+ include_directories: top_inc,
+ c_args: ['-DCURSOR_DIR="' + pkgdatadir + '"'],
+)
+
+toolbareditor_inc = include_directories('.')