aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-08-12 23:34:53 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-08-12 23:34:53 +0800
commit1285912f049822720b8643d2417bfd6b7ad58fc6 (patch)
tree207a8628079b566c1e9a6fe89a0377b6f617465b /shell
parent51f77f649b27e6013038c642c532d0547c7fdddd (diff)
downloadgsoc2013-evolution-1285912f049822720b8643d2417bfd6b7ad58fc6.tar.gz
gsoc2013-evolution-1285912f049822720b8643d2417bfd6b7ad58fc6.tar.zst
gsoc2013-evolution-1285912f049822720b8643d2417bfd6b7ad58fc6.zip
Put the folder title bar into an EGrayBar.
* e-shell-view.c (setup_widgets): Put the folder title bar into an EGrayBar. * e-gray-bar.c: New. * e-gray-bar.h: New. svn path=/trunk/; revision=11932
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog8
-rw-r--r--shell/Makefile.am2
-rw-r--r--shell/e-gray-bar.c120
-rw-r--r--shell/e-gray-bar.h61
-rw-r--r--shell/e-shell-view.c14
5 files changed, 201 insertions, 4 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index c99e2c0207..ba96655f0e 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,13 @@
2001-08-12 Ettore Perazzoli <ettore@ximian.com>
+ * e-shell-view.c (setup_widgets): Put the folder title bar into an
+ EGrayBar.
+
+ * e-gray-bar.c: New.
+ * e-gray-bar.h: New.
+
+2001-08-12 Ettore Perazzoli <ettore@ximian.com>
+
[Finally! Fix #413, "Support for stock folders", and #786, "i18n:
default folder names are not translated".]
diff --git a/shell/Makefile.am b/shell/Makefile.am
index a85307efae..9bd2eaac79 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -105,6 +105,8 @@ evolution_SOURCES = \
e-folder-type-registry.h \
e-folder.c \
e-folder.h \
+ e-gray-bar.c \
+ e-gray-bar.h \
e-local-folder.c \
e-local-folder.h \
e-local-storage.c \
diff --git a/shell/e-gray-bar.c b/shell/e-gray-bar.c
new file mode 100644
index 0000000000..b15c2a0fc6
--- /dev/null
+++ b/shell/e-gray-bar.c
@@ -0,0 +1,120 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-gray-bar.c
+ *
+ * Copyright (C) 2001 Ximian, Inc.
+ *
+ * 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.
+ *
+ * Author: Ettore Perazzoli <ettore@ximian.com>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-gray-bar.h"
+
+#include <gtk/gtkrc.h>
+#include <gtk/gtktypeutils.h>
+#include <gtk/gtkwidget.h>
+
+#include <gal/util/e-util.h>
+
+
+#define PARENT_TYPE gtk_event_box_get_type ()
+static GtkEventBoxClass *parent_class = NULL;
+
+
+static void
+endarken_style (GtkWidget *widget)
+{
+ GtkStyle *style;
+ GtkRcStyle *new_rc_style;
+ int i;
+
+ style = widget->style;
+
+ new_rc_style = gtk_rc_style_new ();
+
+ for (i = 0; i < 5; i++) {
+ new_rc_style->bg[i].red = 0xffff;
+ new_rc_style->bg[i].green = 0x0000;
+ new_rc_style->bg[i].blue = 0xffff;
+ new_rc_style->base[i].red = style->base[i].red * .8;
+ new_rc_style->base[i].green = style->base[i].green * .8;
+ new_rc_style->base[i].blue = style->base[i].blue * .8;
+ new_rc_style->fg[i].red = 0xffff;
+ new_rc_style->fg[i].green = 0xffff;
+ new_rc_style->fg[i].blue = 0xffff;
+ new_rc_style->text[i].red = 0xffff;
+ new_rc_style->text[i].green = 0xffff;
+ new_rc_style->text[i].blue = 0xffff;
+
+ new_rc_style->color_flags[i] = GTK_RC_BG | GTK_RC_FG | GTK_RC_BASE | GTK_RC_TEXT;
+ }
+
+ gtk_widget_modify_style (widget, new_rc_style);
+
+ gtk_rc_style_unref (new_rc_style);
+}
+
+
+static void
+impl_style_set (GtkWidget *widget,
+ GtkStyle *previous_style)
+{
+ static int in_style_set = 0;
+
+ if (in_style_set > 0)
+ return;
+
+ in_style_set ++;
+
+ endarken_style (widget);
+
+ in_style_set --;
+}
+
+
+static void
+class_init (GtkObjectClass *object_class)
+{
+ GtkWidgetClass *widget_class;
+
+ parent_class = gtk_type_class (PARENT_TYPE);
+
+ widget_class = GTK_WIDGET_CLASS (object_class);
+ widget_class->style_set = impl_style_set;
+}
+
+static void
+init (EGrayBar *gray_bar)
+{
+}
+
+
+GtkWidget *
+e_gray_bar_new (void)
+{
+ GtkWidget *new;
+
+ new = gtk_type_new (e_gray_bar_get_type ());
+
+ return new;
+}
+
+
+E_MAKE_TYPE (e_gray_bar, "EGrayBar", EGrayBar, class_init, init, PARENT_TYPE)
diff --git a/shell/e-gray-bar.h b/shell/e-gray-bar.h
new file mode 100644
index 0000000000..72a699ce0f
--- /dev/null
+++ b/shell/e-gray-bar.h
@@ -0,0 +1,61 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-gray-bar.h
+ *
+ * Copyright (C) 2001 Ximian, Inc.
+ *
+ * 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.
+ *
+ * Author: Ettore Perazzoli <ettore@ximian.com>
+ */
+
+#ifndef _E_GRAY_BAR_H_
+#define _E_GRAY_BAR_H_
+
+#include <gtk/gtkeventbox.h>
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
+
+#define E_TYPE_GRAY_BAR (e_gray_bar_get_type ())
+#define E_GRAY_BAR(obj) (GTK_CHECK_CAST ((obj), E_TYPE_GRAY_BAR, EGrayBar))
+#define E_GRAY_BAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_GRAY_BAR, EGrayBarClass))
+#define E_IS_GRAY_BAR(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_GRAY_BAR))
+#define E_IS_GRAY_BAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_GRAY_BAR))
+
+
+typedef struct _EGrayBar EGrayBar;
+typedef struct _EGrayBarPrivate EGrayBarPrivate;
+typedef struct _EGrayBarClass EGrayBarClass;
+
+struct _EGrayBar {
+ GtkEventBox parent;
+};
+
+struct _EGrayBarClass {
+ GtkEventBoxClass parent_class;
+};
+
+
+GtkType e_gray_bar_get_type (void);
+GtkWidget *e_gray_bar_new (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _E_GRAY_BAR_H_ */
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 00087db30d..4180c3939e 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -54,6 +54,7 @@
#include "evolution-shell-view.h"
+#include "e-gray-bar.h"
#include "e-shell-constants.h"
#include "e-shell-folder-title-bar.h"
#include "e-shell-utils.h"
@@ -650,6 +651,7 @@ setup_storage_set_subwindow (EShellView *shell_view)
gtk_container_add (GTK_CONTAINER (scroll_frame), storage_set_view);
vbox = gtk_vbox_new (FALSE, 0);
+
priv->storage_set_title_bar = e_title_bar_new (_("Folders"));
gtk_box_pack_start (GTK_BOX (vbox), priv->storage_set_title_bar, FALSE, FALSE, 0);
@@ -800,6 +802,7 @@ setup_widgets (EShellView *shell_view)
{
EShellViewPrivate *priv;
GtkWidget *contents_vbox;
+ GtkWidget *gray_bar;
priv = shell_view->priv;
@@ -842,10 +845,11 @@ setup_widgets (EShellView *shell_view)
e_paned_pack2 (E_PANED (priv->view_hpaned), priv->notebook, TRUE, FALSE);
e_paned_set_position (E_PANED (priv->view_hpaned), DEFAULT_TREE_WIDTH);
- gtk_box_pack_start (GTK_BOX (priv->view_vbox), priv->folder_title_bar,
- FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (priv->view_vbox), priv->view_hpaned,
- TRUE, TRUE, 0);
+ gray_bar = e_gray_bar_new ();
+ gtk_container_add (GTK_CONTAINER (gray_bar), priv->folder_title_bar);
+ gtk_box_pack_start (GTK_BOX (priv->view_vbox), gray_bar, FALSE, FALSE, 0);
+
+ gtk_box_pack_start (GTK_BOX (priv->view_vbox), priv->view_hpaned, TRUE, TRUE, 0);
priv->hpaned = e_hpaned_new ();
gtk_container_add (GTK_CONTAINER (priv->shortcut_frame), priv->shortcut_bar);
@@ -880,6 +884,8 @@ setup_widgets (EShellView *shell_view)
gtk_widget_show (priv->folder_title_bar);
gtk_widget_show (priv->status_bar);
+ gtk_widget_show (gray_bar);
+
/* By default, both the folder bar and shortcut bar are visible. */
priv->shortcut_bar_mode = E_SHELL_VIEW_SUBWINDOW_STICKY;
priv->folder_bar_mode = E_SHELL_VIEW_SUBWINDOW_STICKY;
commit/?h=EVOLUTION_2_23_3&id=5e4904e25530710a32a1f37ff28c69a6d8afc229'>Fixes #461474.Chenthill Palanisamy2007-07-302-4/+5 * Fixes #455862Chenthill Palanisamy2007-07-302-9/+89 * Fixes #335881.Chenthill Palanisamy2007-07-302-8/+87 * Fixes #460825.Chenthill Palanisamy2007-07-292-8/+12 * Updated fix #326388.Chenthill Palanisamy2007-07-292-2/+4 * Fixes #326388Chenthill Palanisamy2007-07-292-1/+8 * Updated Spanish translationJorge Gonzalez Gonzalez2007-07-292-420/+451 * sv.po: Swedish translation updatedDaniel Nylander2007-07-292-666/+754 * ** Fix for bug #459030Srinivasa Ragavan2007-07-292-9/+15 * Fix for build breakSrinivasa Ragavan2007-07-292-2/+7 * ** Fix for bug #451211.Hiroyuki Ikezoe2007-07-292-1/+8 * Updated Occitan translationYannig MARCHEGAY2007-07-291-26/+25 * Fixes #268162.Chenthill Palanisamy2007-07-293-0/+84 * ** Fix for bug #458894Srinivasa Ragavan2007-07-292-0/+10 * ** Fix for bug #410287 from LuckySrinivasa Ragavan2007-07-292-3/+9 * ** Fix for bug #453544 from hggdhSrinivasa Ragavan2007-07-292-4/+10 * ** Fix for bug #428123 from LuckySrinivasa Ragavan2007-07-292-1/+7 * ** Fix for bug #428123 from LuckySrinivasa Ragavan2007-07-292-2/+8 * ** Fix for bug #332112 from LuckySrinivasa Ragavan2007-07-292-1/+7 * ** Fix for bug #237989Srinivasa Ragavan2007-07-294-8/+142 * ** Fix for bug #444433 from LuckySrinivasa Ragavan2007-07-295-11/+20 * ** Fix for bug #458820 from Cosimo CecchiSrinivasa Ragavan2007-07-292-2/+27 * ** Fixes bug #451211Srinivasa Ragavan2007-07-293-2/+12 * add two missing files.Andre Klapper2007-07-282-0/+6 * Enable configure option for support exchange-operatoion.Hiroyuki Ikezoe2007-07-282-3/+9 * Remove E_MAKE_TYPE macro.Hiroyuki Ikezoe2007-07-2897-1176/+754 * Collect all the required package versions in one place and explicitlyMatthew Barnes2007-07-2815-53/+124 * 2007-07-27 Johnny Jacob Fix for bug #457523.Milan Crha2007-07-272-2/+12 * Updated Spanish translationJorge Gonzalez Gonzalez2007-07-272-182/+253 * ** Fix for bug #323522Srinivasa Ragavan2007-07-272-1/+9 * 2007-07-27 mcrha Fix for bug #303937Milan Crha2007-07-272-1/+8 * 2007-07-27 mcrha Fix for bug #457394Milan Crha2007-07-272-2/+12 * Plugged memory leaks.Hiroyuki Ikezoe2007-07-2710-3/+34 * Do not free const pointer. Plugged memory leak.Hiroyuki Ikezoe2007-07-272-4/+9 * Use g_strdup() instead of g_strdup_printf() for duplication of a stringHiroyuki Ikezoe2007-07-272-3/+8 * Configure attachment-reminder plugin within the plugin-manager.Sankar P2007-07-263-20/+45 * Do not need to call g_source_remove(). If the callback function returnsHiroyuki Ikezoe2007-07-262-9/+6 * Plugged memory leaks.Hiroyuki Ikezoe2007-07-265-5/+55 * Plugged memory leaks.Hiroyuki Ikezoe2007-07-264-2/+23 * Plugged memory leak.Hiroyuki Ikezoe2007-07-262-0/+6 * Plugged memory leaks.Hiroyuki Ikezoe2007-07-264-0/+11 * Plugged memory leak.Hiroyuki Ikezoe2007-07-262-0/+9 * Plugins should be configurable within the plugin-manager itself.Sankarasivasubramanian Pasupathilingam2007-07-265-3/+90 * 2007-07-26 mcrha Fix for bug #273386Milan Crha2007-07-264-5/+25 * Committed on behalf of Atos Origin Communication SystemsSankar P2007-07-262-3/+11 * 2007-07-26 mcrha Fix for bug #273699Milan Crha2007-07-262-2/+11 * Plugged memory leak and the second argument of g_utf8_strdown() should beHiroyuki Ikezoe2007-07-262-9/+26 * ** Fix for bug #458511Hiroyuki Ikezoe2007-07-262-5/+12 * Plugged memory leak.Hiroyuki Ikezoe2007-07-262-1/+6 * Plugged memory leak.Hiroyuki Ikezoe2007-07-262-0/+5 * ** Fixes 459251Johnny Jacob2007-07-262-0/+12 * Plugged memory leak.Hiroyuki Ikezoe2007-07-262-0/+7 * The return value of g_list_remove() should be received because theHiroyuki Ikezoe2007-07-262-1/+7 * Updated Slovenian translationMatic Žgur2007-07-242-4199/+4874 * Updated Telugu translation done by Bharat Kumar <bharatfsf@gmail.com>.Sunil Mohan Adapa2007-07-232-6856/+9429 * Added some screenshots.Daniel Nylander2007-07-236-0/+4 * Corrected translation. Fixes bug #459282.Claude Paroz2007-07-232-2/+6 * Bug #459413. Just return NULL if parent has gone.Li Yuan2007-07-232-0/+10 * Updated French translation by Myriam Malga, Claude Paroz and Stéphane Raimba...Stéphane Raimbault2007-07-222-2164/+2067 * Added some screenshots. Updated Swedish translation.Daniel Nylander2007-07-226-4543/+1775 * Updated Spanish translationJorge Gonzalez Gonzalez2007-07-212-54/+55 * Updates to Serbian translations.Danilo Šegan2007-07-212-6/+4 * Updates to Serbian translations.Danilo Šegan2007-07-213-5975/+7352 * Minor typos in strings.Claude Paroz2007-07-214-2/+10 * Fixed syntax of ngettext.Claude Paroz2007-07-202-1/+6 * Translation updated.Vincent van Adrighem2007-07-202-1524/+2040 * Translation updated.Vincent van Adrighem2007-07-202-4657/+4383 * Updated Latvian Translation.Raivis Dejus2007-07-192-3297/+3939 * Remove "/" as separator.Hiroyuki Ikezoe2007-07-192-3/+8 * Remove needless g_strndup().Hiroyuki Ikezoe2007-07-192-6/+6 * Updated Spanish translation. Fixes bug #457959Jorge Gonzalez Gonzalez2007-07-182-3/+7 * Remove unused variables.Sankar P2007-07-182-2/+7 * sv.po: Updated Swedish translationDaniel Nylander2007-07-181-1/+1 * sv.po: Updated Swedish translationDaniel Nylander2007-07-182-2371/+2180 * Decodes Face header and displays the image.Sankar P2007-07-172-2/+33 * Included face plugin to sources. Helps in attaching Face header toSankar P2007-07-172-1/+7 * Initial set of files. Implements Face header support.Sankar P2007-07-176-0/+239 * Changed the string "Cancel" to "Continue Editing"Sankar P2007-07-172-4/+9 * Updated Spanish translationJorge Gonzalez Gonzalez2007-07-172-254/+262 * Updated Finnish translationIlkka Tuohela2007-07-172-2965/+3562 * Provide support for keeping your signature on top while replying.Sankar P2007-07-166-26/+159 * Estonian translation update by Ivar Smolin.Priit Laes2007-07-162-430/+548 * Remove needless g_strndup().Hiroyuki Ikezoe2007-07-152-4/+7 * Estonian translation update by Ivar Smolin.Priit Laes2007-07-132-185/+188 * updated si translationSANDRA MARAKKALA DANISHKA NAVIN2007-07-131-1092/+1073 * Fix a bunch of new implicit function declarations.Matthew Barnes2007-07-132-2/+12 * Updated Korean translation by Eunju Kim.Changwoo Ryu2007-07-122-3053/+3303 * Fix the date. See comments in bug #353752.Hiroyuki Ikezoe2007-07-124-4/+4 * Take warning softly instead of a crashSrinivasa Ragavan2007-07-112-2/+10 * Updated TranslationAnkitkumar Rameshchandra Patel2007-07-102-2964/+3212 * Fixed Marking for Translation bugsSankar P2007-07-102-3/+8 * Updated Spanish translationJorge Gonzalez Gonzalez2007-07-101-5/+7 * Updated Spanish translationJorge Gonzalez Gonzalez2007-07-102-417/+549 * Evolution 2.11.5 releaseEVOLUTION_2_11_5Srinivasa Ragavan2007-07-103-1/+71 * Declare es_event_target_new_shell().Matthew Barnes2007-07-102-0/+5 * 2007-07-09 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Updated Macedonian...Jovan Naumovski2007-07-102-4085/+4230 * Fix for build breakSrinivasa Ragavan2007-07-102-1/+7 * Fix for build breakSrinivasa Ragavan2007-07-092-3/+7 * Fixed a build break.Chenthill Palanisamy2007-07-092-4/+8 * Adding the exchange delegation feature.Chenthill Palanisamy2007-07-091-0/+21 * reviewed by: Veerapuram Varadhan <vvaradhan@novell.com>Chenthill Palanisamy2007-07-095-43/+186 * reviewed by: Veerapuram Varadhan <vvaradhan@novell.com>Chenthill Palanisamy2007-07-092-0/+17 * reviewed by: Veerapuram Varadhan <vvaradhan@novell.com>Chenthill Palanisamy2007-07-0910-31/+609 * reviewed by: Veerapuram Varadhan <vvaradhan@novell.com>Chenthill Palanisamy2007-07-094-151/+435 * Fixed bugs where the .so wasn't reffered rightly.Srinivasa Ragavan2007-07-092-3/+6 * ** Cleanups from Lucky Wankhede Srinivasa Ragavan2007-07-093-143/+174 * Added mnemonics. Fixed warnings. Added new strings.Johnny Jacob2007-07-094-15/+23 * Added prototypes for e_msg_composer_get_raw_message_text andJohnny Jacob2007-07-093-1/+11 * Committed on behalf of Gilles Dartiguelongue <dartigug@esiee.fr>Sankar P2007-07-093-204/+290 * Fix for bug #353752Srinivasa Ragavan2007-07-0914-76/+133 * ** Fix for bug #307410Srinivasa Ragavan2007-07-095-33/+79 * ** Fix for bug #271864 from Hiroyuki IkezoeSrinivasa Ragavan2007-07-092-39/+32 * ** Fix for bug #234294Srinivasa Ragavan2007-07-092-0/+34 * ** Fix for bug #347782 from hggdhSrinivasa Ragavan2007-07-092-2/+9 * Fixes #300584Chenthill Palanisamy2007-07-095-10/+104 * Fixes #387844Chenthill Palanisamy2007-07-092-1/+8 * Fixes #387844Chenthill Palanisamy2007-07-09