[gthumb/ext] [file tools] added separators
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb/ext] [file tools] added separators
- Date: Fri, 11 Sep 2009 20:18:11 +0000 (UTC)
commit ab56373800a3da4decb6ac8d8dce77efec9b4115
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri Sep 11 14:06:28 2009 +0200
[file tools] added separators
extensions/file_tools/gth-file-tool-crop.c | 2 +-
extensions/file_tools/gth-file-tool-desaturate.c | 2 +-
extensions/file_tools/gth-file-tool-enhance.c | 2 +-
extensions/file_tools/gth-file-tool-equalize.c | 2 +-
extensions/file_tools/gth-file-tool-redo.c | 2 +-
extensions/file_tools/gth-file-tool-save.c | 2 +-
extensions/file_tools/gth-file-tool-undo.c | 2 +-
gthumb/gth-file-tool.c | 12 +++++++++++-
gthumb/gth-file-tool.h | 4 +++-
gthumb/gth-toolbox.c | 9 +++++++++
10 files changed, 30 insertions(+), 9 deletions(-)
---
diff --git a/extensions/file_tools/gth-file-tool-crop.c b/extensions/file_tools/gth-file-tool-crop.c
index 5291de7..689c50f 100644
--- a/extensions/file_tools/gth-file-tool-crop.c
+++ b/extensions/file_tools/gth-file-tool-crop.c
@@ -455,7 +455,7 @@ static void
gth_file_tool_crop_instance_init (GthFileToolCrop *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_FILE_TOOL_CROP, GthFileToolCropPrivate);
- gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_EDIT, _("Crop"), _("Crop"));
+ gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_EDIT, _("Crop"), _("Crop"), TRUE);
}
diff --git a/extensions/file_tools/gth-file-tool-desaturate.c b/extensions/file_tools/gth-file-tool-desaturate.c
index f7df83b..d639a24 100644
--- a/extensions/file_tools/gth-file-tool-desaturate.c
+++ b/extensions/file_tools/gth-file-tool-desaturate.c
@@ -110,7 +110,7 @@ gth_file_tool_desaturate_activate (GthFileTool *base)
static void
gth_file_tool_desaturate_instance_init (GthFileToolDesaturate *self)
{
- gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_EDIT, _("Desaturate"), _("Desaturate"));
+ gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_EDIT, _("Desaturate"), _("Desaturate"), FALSE);
}
diff --git a/extensions/file_tools/gth-file-tool-enhance.c b/extensions/file_tools/gth-file-tool-enhance.c
index 5d4e599..bbd35fd 100644
--- a/extensions/file_tools/gth-file-tool-enhance.c
+++ b/extensions/file_tools/gth-file-tool-enhance.c
@@ -271,7 +271,7 @@ gth_file_tool_enhance_update_sensitivity (GthFileTool *base)
static void
gth_file_tool_enhance_instance_init (GthFileToolEnhance *self)
{
- gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_EDIT /* FIXME GTH_STOCK_ENHANCE */, _("White Balance"), NULL);
+ gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_EDIT /* FIXME GTH_STOCK_ENHANCE */, _("White Balance"), NULL, FALSE);
gtk_widget_set_tooltip_text (GTK_WIDGET (self), _("Automatic white balance correction"));
}
diff --git a/extensions/file_tools/gth-file-tool-equalize.c b/extensions/file_tools/gth-file-tool-equalize.c
index 091b761..edc43ff 100644
--- a/extensions/file_tools/gth-file-tool-equalize.c
+++ b/extensions/file_tools/gth-file-tool-equalize.c
@@ -191,7 +191,7 @@ gth_file_tool_equalize_update_sensitivity (GthFileTool *base)
static void
gth_file_tool_equalize_instance_init (GthFileToolEqualize *self)
{
- gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_EDIT /* FIXME GTH_STOCK_EQUALIZE */, _("Equalize"), NULL);
+ gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_EDIT /* FIXME GTH_STOCK_EQUALIZE */, _("Equalize"), NULL, FALSE);
gtk_widget_set_tooltip_text (GTK_WIDGET (self), _("Automatic contrast enhancement"));
}
diff --git a/extensions/file_tools/gth-file-tool-redo.c b/extensions/file_tools/gth-file-tool-redo.c
index 64f1297..6152e5a 100644
--- a/extensions/file_tools/gth-file-tool-redo.c
+++ b/extensions/file_tools/gth-file-tool-redo.c
@@ -60,7 +60,7 @@ gth_file_tool_redo_activate (GthFileTool *base)
static void
gth_file_tool_redo_instance_init (GthFileToolRedo *self)
{
- gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_REDO, _("Redo"), _("Redo"));
+ gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_REDO, _("Redo"), _("Redo"), FALSE);
}
diff --git a/extensions/file_tools/gth-file-tool-save.c b/extensions/file_tools/gth-file-tool-save.c
index aa66d4e..3c61aa5 100644
--- a/extensions/file_tools/gth-file-tool-save.c
+++ b/extensions/file_tools/gth-file-tool-save.c
@@ -50,7 +50,7 @@ gth_file_tool_save_activate (GthFileTool *tool)
static void
gth_file_tool_save_instance_init (GthFileToolSave *self)
{
- gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_SAVE, _("Save"), _("Save"));
+ gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_SAVE, _("Save"), _("Save"), FALSE);
}
diff --git a/extensions/file_tools/gth-file-tool-undo.c b/extensions/file_tools/gth-file-tool-undo.c
index a2f0532..9df1787 100644
--- a/extensions/file_tools/gth-file-tool-undo.c
+++ b/extensions/file_tools/gth-file-tool-undo.c
@@ -59,7 +59,7 @@ gth_file_tool_undo_activate (GthFileTool *base)
static void
gth_file_tool_undo_instance_init (GthFileToolUndo *self)
{
- gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_UNDO, _("Undo"), _("Undo"));
+ gth_file_tool_construct (GTH_FILE_TOOL (self), GTK_STOCK_UNDO, _("Undo"), _("Undo"), TRUE);
}
diff --git a/gthumb/gth-file-tool.c b/gthumb/gth-file-tool.c
index d966e79..45b42c5 100644
--- a/gthumb/gth-file-tool.c
+++ b/gthumb/gth-file-tool.c
@@ -40,6 +40,7 @@ struct _GthFileToolPrivate {
const char *icon_name;
const char *button_text;
const char *options_title;
+ gboolean separator;
};
@@ -161,7 +162,8 @@ void
gth_file_tool_construct (GthFileTool *self,
const char *icon_name,
const char *button_text,
- const char *options_title)
+ const char *options_title,
+ gboolean separator)
{
GtkWidget *hbox;
GtkWidget *icon;
@@ -170,6 +172,7 @@ gth_file_tool_construct (GthFileTool *self,
self->priv->icon_name = icon_name;
self->priv->button_text = button_text;
self->priv->options_title = options_title;
+ self->priv->separator = separator;
hbox = gtk_hbox_new (FALSE, 6);
@@ -247,6 +250,13 @@ gth_file_tool_get_options_title (GthFileTool *self)
}
+gboolean
+gth_file_tool_has_separator (GthFileTool *self)
+{
+ return self->priv->separator;
+}
+
+
void
gth_file_tool_destroy_options (GthFileTool *self)
{
diff --git a/gthumb/gth-file-tool.h b/gthumb/gth-file-tool.h
index 79ba3a1..8781128 100644
--- a/gthumb/gth-file-tool.h
+++ b/gthumb/gth-file-tool.h
@@ -63,13 +63,15 @@ GType gth_file_tool_get_type (void);
void gth_file_tool_construct (GthFileTool *self,
const char *icon_name,
const char *button_text,
- const char *options_title);
+ const char *options_title,
+ gboolean separator);
GtkWidget * gth_file_tool_get_window (GthFileTool *self);
const char * gth_file_tool_get_icon_name (GthFileTool *self);
void gth_file_tool_activate (GthFileTool *self);
void gth_file_tool_update_sensitivity (GthFileTool *self);
GtkWidget * gth_file_tool_get_options (GthFileTool *self);
const char * gth_file_tool_get_options_title (GthFileTool *self);
+gboolean gth_file_tool_has_separator (GthFileTool *self);
void gth_file_tool_destroy_options (GthFileTool *self);
void gth_file_tool_show_options (GthFileTool *self);
void gth_file_tool_hide_options (GthFileTool *self);
diff --git a/gthumb/gth-toolbox.c b/gthumb/gth-toolbox.c
index 3fcb961..6693448 100644
--- a/gthumb/gth-toolbox.c
+++ b/gthumb/gth-toolbox.c
@@ -279,6 +279,15 @@ _gth_toolbox_add_childs (GthToolbox *toolbox)
g_signal_connect (child, "show-options", G_CALLBACK (child_show_options_cb), toolbox);
g_signal_connect (child, "hide-options", G_CALLBACK (child_hide_options_cb), toolbox);
gtk_widget_show (child);
+
+ if (gth_file_tool_has_separator (GTH_FILE_TOOL (child))) {
+ GtkWidget *separator;
+
+ separator = gtk_hseparator_new ();
+ gtk_widget_show (separator);
+ gtk_box_pack_start (GTK_BOX (toolbox->priv->box), separator, FALSE, FALSE, 0);
+ }
+
gtk_box_pack_start (GTK_BOX (toolbox->priv->box), child, FALSE, FALSE, 0);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]