aboutsummaryrefslogtreecommitdiffstats
path: root/notes/e-bevel-button.c
diff options
context:
space:
mode:
Diffstat (limited to 'notes/e-bevel-button.c')
-rw-r--r--notes/e-bevel-button.c175
1 files changed, 0 insertions, 175 deletions
diff --git a/notes/e-bevel-button.c b/notes/e-bevel-button.c
deleted file mode 100644
index 1d96d88531..0000000000
--- a/notes/e-bevel-button.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-#include <config.h>
-#include <gtk/gtkbutton.h>
-
-#include <gal/util/e-util.h>
-
-#include "e-bevel-button.h"
-#include "e-bevel-button-util.h"
-
-#define PARENT_TYPE GTK_TYPE_BUTTON
-
-static GtkButtonClass *parent_class = NULL;
-
-struct _EBevelButtonPrivate {
- GdkColor base_color;
- GdkColor dark_color;
- GdkColor light_color;
- GdkGC *gc;
-};
-
-static void
-e_bevel_button_paint (GtkWidget *widget, GdkRectangle *area)
-{
- EBevelButton *button;
-
- button = E_BEVEL_BUTTON (widget);
-
- if (GTK_WIDGET_DRAWABLE (widget)) {
- gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
- gdk_window_clear_area (widget->window, area->x, area->y, area->width, area->height);
-
- gdk_gc_set_foreground (button->priv->gc, &button->priv->base_color);
- gdk_draw_rectangle (widget->window,
- button->priv->gc,
- TRUE,
- 0, 0,
- widget->allocation.width, widget->allocation.height);
-
- if (GTK_BUTTON (button)->in_button) {
- gdk_gc_set_foreground (button->priv->gc,
- GTK_BUTTON (button)->button_down ?
- &button->priv->dark_color :
- &button->priv->light_color);
- gdk_draw_line (widget->window, button->priv->gc,
- 0, 0, 0, widget->allocation.height - 2);
- gdk_draw_line (widget->window, button->priv->gc,
- 0, 0, widget->allocation.width - 2, 0);
-
- gdk_gc_set_foreground (button->priv->gc,
- GTK_BUTTON (button)->button_down ?
- &button->priv->light_color :
- &button->priv->dark_color);
- gdk_draw_line (widget->window, button->priv->gc,
- widget->allocation.width - 1 , 1,
- widget->allocation.width - 1, widget->allocation.height - 1);
- gdk_draw_line (widget->window, button->priv->gc,
- 1, widget->allocation.height - 1,
- widget->allocation.width - 1, widget->allocation.height - 1);
- }
- }
-}
-
-static gint
-e_bevel_button_expose (GtkWidget *widget, GdkEventExpose *event)
-{
- GtkBin *bin;
- GdkEventExpose child_event;
-
- if (GTK_WIDGET_DRAWABLE (widget)) {
- bin = GTK_BIN (widget);
-
- e_bevel_button_paint (widget, &event->area);
-
- child_event = *event;
- if (bin->child && GTK_WIDGET_NO_WINDOW (bin->child) &&
- gtk_widget_intersect (bin->child, &event->area, &child_event.area))
- gtk_widget_event (bin->child, (GdkEvent*) &child_event);
- }
-
- return FALSE;
-}
-
-static void
-e_bevel_button_draw (GtkWidget *widget, GdkRectangle *area)
-{
- GdkRectangle child_area;
- GdkRectangle tmp_area;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (E_IS_BEVEL_BUTTON (widget));
- g_return_if_fail (area != NULL);
-
- if (GTK_WIDGET_DRAWABLE (widget)) {
- tmp_area = *area;
- tmp_area.x -= GTK_CONTAINER (widget)->border_width;
- tmp_area.y -= GTK_CONTAINER (widget)->border_width;
-
- e_bevel_button_paint (widget, &tmp_area);
-
- if (GTK_BIN (widget)->child && gtk_widget_intersect (GTK_BIN (widget)->child, &tmp_area, &child_area))
- gtk_widget_draw (GTK_BIN (widget)->child, &child_area);
- }
-}
-
-static void
-e_bevel_button_realize (GtkWidget *widget)
-{
- EBevelButton *button = E_BEVEL_BUTTON (widget);
-
- GTK_WIDGET_CLASS (parent_class)->realize (widget);
-
- button->priv->gc = gdk_gc_new (widget->window);
-
- gdk_color_parse ("#d0d888", &button->priv->base_color);
- e_bevel_button_util_shade (&button->priv->base_color,
- &button->priv->light_color,
- LIGHTNESS_MULT);
- e_bevel_button_util_shade (&button->priv->base_color,
- &button->priv->dark_color,
- DARKNESS_MULT);
- gdk_colormap_alloc_color (gdk_rgb_get_cmap (), &button->priv->base_color, FALSE, TRUE);
- gdk_colormap_alloc_color (gdk_rgb_get_cmap (), &button->priv->light_color, FALSE, TRUE);
- gdk_colormap_alloc_color (gdk_rgb_get_cmap (), &button->priv->dark_color, FALSE, TRUE);
-}
-
-static void
-e_bevel_button_class_init (EBevelButtonClass *klass)
-{
- GtkWidgetClass *widget_class;
-
- widget_class = (GtkWidgetClass *)klass;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- widget_class->draw = e_bevel_button_draw;
- widget_class->expose_event = e_bevel_button_expose;
- widget_class->realize = e_bevel_button_realize;
-}
-
-static void
-e_bevel_button_init (EBevelButton *button)
-{
- EBevelButtonPrivate *priv;
-
- GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
-
- priv = g_new (EBevelButtonPrivate, 1);
-
- button->priv = priv;
-}
-
-GtkWidget *
-e_bevel_button_new (void)
-{
- EBevelButton *button;
-
- button = gtk_type_new (E_TYPE_BEVEL_BUTTON);
-
- return GTK_WIDGET (button);
-}
-
-E_MAKE_TYPE (e_bevel_button, "EBevelButton", EBevelButton, e_bevel_button_class_init, e_bevel_button_init, PARENT_TYPE);
-
-
-
-
-
-
-
-
-
-
-
-
0'>2005-05-072-4/+4 * Fix plist.krion2005-05-011-0/+2 * Update to 0.10.8.marcus2005-04-304-4/+73 * Update to 1.8.4.adamw2005-04-293-3/+4 * - Update to 1.0.4ahze2005-04-273-3/+29 * Update to 0.10.7.adamw2005-04-213-4/+8 * Update to 1.8.3.adamw2005-04-123-10/+6 * Update maintainer's email address.linimon2005-04-081-1/+1 * Update to 1.0.3.marcus2005-04-032-3/+3 * Update to 0.10.5.marcus2005-04-033-16/+15 * Update to KDE 3.4lofi2005-03-2112-12/+14610 * Restore RESTRICTED line.trevor2005-03-153-0/+3 * - Fix plist nitpav2005-03-131-0/+1 * -Update to 0.12.0, works with GTK 2.6/GNOME 2.10.mezz2005-03-121-1/+0 * Bump PORTREVISION to chase the glib20 shared lib version change.marcus2005-03-126-2/+6 * Presenting GNOME 2.10 for FreeBSD!marcus2005-03-1213-70/+146 * - Chase rerolled distfileahze2005-03-112-4/+4 * Fix build on 4.X.adamw2005-03-092-0/+24 * Update to 0.12.0kwm2005-03-084-8/+8 * Update to 1.6.3.kwm2005-03-082-3/+3 * Fix some crashers trying to initialize gnome-speech when no voices aremarcus2005-02-142-4/+14 * Update to 0.11.14.marcus2005-02-064-6/+6 * Update to 0.11.13.marcus2005-01-204-6/+6 * Update to 0.11.12.marcus2005-01-186-6/+8 * Remove the ang locale if it is empty.marcus2005-01-152-0/+4 * Prevent Java support from being erroneously enable.marcus2005-01-144-0/+22 * Don't remove the gtk-2.0/modules directory as this is handled by gtk20.marcus2005-01-131-1/+0 * Update to 0.3.6.adamw2005-01-126-6/+48 * Update to 1.8.2.adamw2005-01-092-3/+3 * Say hello to the linux mega patch, it consolidates our linux bits anetchild2005-01-016-36/+78 * Update MASTER_SITES for 2.3 -> 2.4.mezz2004-12-241-1/+1 * Fix xml syntax in OMF files.bland2004-12-211-0/+7 * Fix build on 4.X.marcus2004-12-211-0/+28 * Update to 0.9.19.marcus2004-12-212-4/+4 * Clean up handling of locale directories at deinstall-time:kris2004-12-161-0/+6 * Update to KDE 3.3.2lofi2004-12-1412-114/+12 * Update to 1.6.2.marcus2004-12-133-3/+7 * Fix the pkg-plist.mezz2004-12-112-0/+2 * Update to 0.11.17.marcus2004-12-083-6/+58 * Update to 0.11.11.marcus2004-12-084-6/+6 * Update to 1.6.1.marcus2004-12-033-32/+3 * Update to 0.9.18.marcus2004-11-302-4/+4 * Update to 1.8.1.marcus2004-11-263-3/+4 * Use new INSTALLS_OMF.mezz2004-11-234-10/+2 * Update to 0.11.0. Three new ports (Ruby/RSVG, Ruby/GnomePrint andmezz2004-11-151-1/+0 * Fix a crash in dasher if there are no speech voices.marcus2004-11-132-1/+12 * Update to 0.9.17.adamw2004-11-112-5/+4 * Bump 29 ports that use GCONF_SCHEMAS. Somehow, the diff of GNOME 2.8.x hasmezz2004-11-102-0/+2 * Update to KDE 3.3.1lofi2004-11-086-12/+12 * Bump PORTREVISIONS for all ports that depend on atk or pango to ease in themarcus2004-11-082-1/+2 * Add some files missed in the previous GNOME 2.8 update.marcus2004-11-084-0/+103 * Presenting GNOME 2.8 for FreeBSD (2.8.1 to be exact).marcus2004-11-0826-116/+323 * Update to KDE 3.3lofi2004-08-3118-18/+30 * This patch is no longer needed.marcus2004-08-312-0/+0 * Update to 0.3.5.marcus2004-08-316-110/+8 * - Update to 0.10.0.mezz2004-08-152-5/+5 * Dasher needs GNOME support by default now.marcus2004-08-081-7/+2 * -Update to 3.2.11.mezz2004-08-034-14/+55 * Apply a big libtool patch to allow porters to use the libtool installed bymarcus2004-07-105-5/+5 * Use the new GConf handling policy, this will be required for GNOME 2.7/2.8 ormezz2004-07-082-520/+8 * Update to 0.3.3.marcus2004-06-114-6/+6 * Update to version 3.2.3lofi2004-06-106-12/+12 * -Update to 1.6.6.mezz2004-06-094-17/+6 * Update to 1.6.5.marcus2004-05-263-3/+14 * Switch to USE_BZIP2 for bandwidith reasons, and also because certain GNOMEmarcus2004-05-224-4/+6 * Update to 1.6.4.marcus2004-05-153-15/+4 * Change my email to mezz@FreeBSD.org.mezz2004-05-031-1/+1 * * Update to 3.2.10marcus2004-05-033-4/+20 * Update to 1.6.3.marcus2004-04-292-3/+3 * Use the new gnomespeech GNOME component.marcus2004-04-291-3/+3 * Update to KDE 3.2.2lofi2004-04-206-12/+12 * Update to 0.8.4.marcus2004-04-203-10/+10 * Update to 0.10.2.marcus2004-04-203-3/+33 * Update to 0.10.11.marcus2004-04-204-6/+6 * Update to 1.4.2.marcus2004-04-203-3/+33 * Update to 1.6.1.marcus2004-04-203-3/+8 * Update to 1.6.2.marcus2004-04-203-3/+4 * Update to 0.8.3.marcus2004-04-163-10/+11 * Add ruby-atk, Ruby binding for ATK.knu2004-04-094-0/+52 * Update to 1.6.1.marcus2004-04-083-3/+10 * Update to 0.8.2.marcus2004-04-073-11/+11 * Presenting GNOME 2.6.0. The FreeBSD GNOME Team feels this our best releasemarcus2004-04-0532-155/+569 * Remove category pkg/COMMENT files in favour of a COMMENT variable in thekris2004-04-022-11/+13 * Update to 0.10.10.adamw2004-03-236-6/+14 * - Add SIZE to GNOME portspav2004-03-186-0/+6 * SIZEify.trevor2004-03-183-0/+3 * Update to 0.10.9.marcus2004-03-176-6/+10 * Update to 1.3.16.marcus2004-03-173-33/+3 * Whoa there, boy, that's a mighty big commit y'all have there...ade2004-03-147-7/+7 * Update to KDE 3.2.1 / QT 3.3.1lofi2004-03-1018-12/+96 * Update to 0.10.8.marcus2004-03-096-6/+10 * Update to 1.3.15.marcus2004-03-092-3/+3 * Add missing dependencies on scrollkeeper.marcus2004-03-041-3/+5 * Add a missing dependency on libxslt.marcus2004-03-041-1/+3 * Update to 1.3.14.marcus2004-03-023-3/+33 * Update to 3.2.4.marcus2004-02-273-3/+47 * Update to 1.3.13.adamw2004-02-258-68/+8 * Update to 0.10.7.adamw2004-02-258-52/+10 * Update to 0.10.6.marcus2004-02-116-6/+8 * Update to 1.3.12.marcus2004-02-112-6/+4 * Add kdeaccessibilitykris2004-02-051-0/+1 * Update to KDE 3.2.0lofi2004-02-056-18/+6 * Update to 3.2.3.marcus2004-02-053-3/+6 * Add kdeaccessibility. This port is set to IGNORE,lofi2004-02-0424-0/+1080 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-0413-4/+13 * patch fromtrevor2004-02-013-6/+6 * The linux-atk port was repo-copied into the accessibility category.trevor2004-01-304-3/+4 * Chase the new locations for gnomespeech and gnomemag.marcus2004-01-221-2/+2 * Repocopy x11/gnopernicus to accessibility/gnopernicus.marcus2004-01-221-1/+1 * Start to populate the new accessibility physical category after respectivemarcus2004-01-2210-9/+17 * Add accessibility and x11-themes as new physical categories.marcus2004-01-202-0/+5 * Add a missing BUILD_DEPENDS on intltool.marcus2004-01-191-0/+2 * Update to 3.2.2.marcus2004-01-164-14/+4 * Update to 1.3.11.marcus2004-01-132-2/+2 * Update to 0.10.5.marcus2004-01-136-4/+10 * Merge a forgotten line from my GNOME 2.5 repo.marcus2004-01-041-1/+1 * Add a missing USE_REINPLACE.marcus2004-01-031-0/+1 * Merge diffs from my GNOME 2.5 repo.marcus2004-01-035-16/+67 * New port: misc/dasher, text entry system (for people with disabilities)edwin2004-01-034-0/+51 * s/rpm2cpio/rpm2cpio.pl/ after the recent update of archivers/rpm2cpio (thenetchild2003-12-123-6/+6 * Fix build on -STABLE.marcus2003-12-102-0/+20 * Update to 0.10.4.marcus2003-12-108-4/+32 * Update to 0.2.8.marcus2003-12-094-4/+4 * Fix build on -STABLE.marcus2003-12-061-0/+11 * Update to 1.3.9.adamw2003-12-063-25/+2 * Fix packing list.trevor2003-11-203-6/+6 * Decrease PORTREVISION from 2 to 0. I hope no one has installedtrevor2003-11-193-0/+3 * new Linux/i386 binary port of Accessibility Toolkit librarytrevor2003-11-199-0/+129 * USE_REINPLACE need be defined only when REINPLACE_CMD is used.trevor2003-11-176-6/+0 * Looks like they re-rolled the atk tarball to re-include the API documentation.marcus2003-10-213-1/+33 * Update to 0.8.4.marcus2003-10-144-18/+53 * Update to 1.3.8.marcus2003-10-142-2/+2 * Remove a patch forgotten in the last commit.marcus2003-10-101-27/+0 * Update to 1.4.1.adamw2003-10-106-38/+6 * Update to 0.7.1.marcus2003-10-083-10/+10 * Correct some obsolete MASTER_SITESmarcus2003-10-061-1/+1 * Fix build under -STABLE.adamw2003-09-301-0/+16 * Update to 0.8.3.marcus2003-09-303-53/+3 * Add gnopernicus, and accessibility launcher for the GNOME desktop.marcus2003-09-185-0/+591 * Add gnomespeech, a library that facilitates text-to-speech for the GNOMEmarcus2003-09-1810-0/+220 * Remove a patch forgotten in the last commit.marcus2003-09-181-0/+0 * Update to GNOME 2.4.0. For all the goodies on what's changed, known issues,marcus2003-09-1818-141/+220 * Update to 0.10.3.adamw2003-09-096-4/+42 * Update to 1.2.1.marcus2003-07-164-15/+6 * Remove REINPLACE commands that were rolled into gnomehack.adamw2003-06-122-8/+0