aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodney Dawes <dobey@ximian.com>2003-03-12 05:22:14 +0800
committerRodney Dawes <dobey@src.gnome.org>2003-03-12 05:22:14 +0800
commitc6a1e23298bcca3ac4f4c1fdb4cdcc297ee424ee (patch)
treea045daac7a166e28b3354303ea4fc08f4a4ce5f6
parent179239f0e51b4ae7470482d1053378aad981eb7a (diff)
downloadgsoc2013-evolution-c6a1e23298bcca3ac4f4c1fdb4cdcc297ee424ee.tar
gsoc2013-evolution-c6a1e23298bcca3ac4f4c1fdb4cdcc297ee424ee.tar.gz
gsoc2013-evolution-c6a1e23298bcca3ac4f4c1fdb4cdcc297ee424ee.tar.bz2
gsoc2013-evolution-c6a1e23298bcca3ac4f4c1fdb4cdcc297ee424ee.tar.lz
gsoc2013-evolution-c6a1e23298bcca3ac4f4c1fdb4cdcc297ee424ee.tar.xz
gsoc2013-evolution-c6a1e23298bcca3ac4f4c1fdb4cdcc297ee424ee.tar.zst
gsoc2013-evolution-c6a1e23298bcca3ac4f4c1fdb4cdcc297ee424ee.zip
Use GtkArrow instead of pixmaps Use GtkArrow instead of pixmaps
2003-03-10 Rodney Dawes <dobey@ximian.com> * e-calendar.c: Use GtkArrow instead of pixmaps * e-combo-button.c: Use GtkArrow instead of pixmaps * e-filter-bar.c: gtk_window_set_policy () is deprecated * e-url-entry.c: Load the icon in a pixbuf instead of GdkPixmap svn path=/trunk/; revision=20254
-rw-r--r--widgets/misc/ChangeLog7
-rw-r--r--widgets/misc/e-calendar.c47
-rw-r--r--widgets/misc/e-combo-button.c28
-rw-r--r--widgets/misc/e-filter-bar.c1
-rw-r--r--widgets/misc/e-url-entry.c12
5 files changed, 11 insertions, 84 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index b236d0c648..d9f289304c 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,10 @@
+2003-03-10 Rodney Dawes <dobey@ximian.com>
+
+ * e-calendar.c: Use GtkArrow instead of pixmaps
+ * e-combo-button.c: Use GtkArrow instead of pixmaps
+ * e-filter-bar.c: gtk_window_set_policy () is deprecated
+ * e-url-entry.c: Load the icon in a pixbuf instead of GdkPixmap
+
2003-03-06 Ettore Perazzoli <ettore@ximian.com>
* e-url-entry.c (destroy): Removed unused variable.
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c
index dce0e05771..0275679f1f 100644
--- a/widgets/misc/e-calendar.c
+++ b/widgets/misc/e-calendar.c
@@ -67,35 +67,6 @@
#define E_CALENDAR_AUTO_MOVE_TIMEOUT 150
#define E_CALENDAR_AUTO_MOVE_TIMEOUT_DELAY 2
-static char * left_arrow_xpm[] = {
- "7 7 3 1",
- " c None",
- ". c #949594",
- "+ c #000000",
- " .+",
- " .+++",
- " .+++++",
- "+++++++",
- " .+++++",
- " .+++",
- " .+"
-};
-
-static char * right_arrow_xpm[] = {
- "7 7 3 1",
- " c None",
- ". c #949594",
- "+ c #000000",
- "+. ",
- "+++. ",
- "+++++. ",
- "+++++++",
- "+++++. ",
- "+++. ",
- "+. "
-};
-
-
static void e_calendar_class_init (ECalendarClass *class);
static void e_calendar_init (ECalendar *cal);
static void e_calendar_destroy (GtkObject *object);
@@ -162,9 +133,6 @@ e_calendar_init (ECalendar *cal)
GdkFont *small_font;
PangoFontDescription *small_font_desc;
GtkWidget *button, *pixmap;
- GdkColormap *colormap;
- GdkPixmap *gdk_pixmap;
- GdkBitmap *gdk_mask;
GTK_WIDGET_UNSET_FLAGS (cal, GTK_CAN_FOCUS);
@@ -205,14 +173,8 @@ e_calendar_init (ECalendar *cal)
G_CALLBACK (e_calendar_on_prev_released),
GTK_OBJECT (cal));
- colormap = gtk_widget_get_colormap (GTK_WIDGET (cal));
- gdk_pixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap,
- &gdk_mask, NULL,
- left_arrow_xpm);
- pixmap = gtk_pixmap_new (gdk_pixmap, gdk_mask);
+ pixmap = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
gtk_widget_show (pixmap);
- gdk_pixmap_unref (gdk_pixmap);
- g_object_unref (gdk_mask);
gtk_container_add (GTK_CONTAINER (button), pixmap);
cal->prev_item = gnome_canvas_item_new (canvas_group,
@@ -231,13 +193,8 @@ e_calendar_init (ECalendar *cal)
G_CALLBACK (e_calendar_on_next_released),
GTK_OBJECT (cal));
- gdk_pixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap,
- &gdk_mask, NULL,
- right_arrow_xpm);
- pixmap = gtk_pixmap_new (gdk_pixmap, gdk_mask);
+ pixmap = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
gtk_widget_show (pixmap);
- gdk_pixmap_unref (gdk_pixmap);
- g_object_unref (gdk_mask);
gtk_container_add (GTK_CONTAINER (button), pixmap);
cal->next_item = gnome_canvas_item_new (canvas_group,
diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c
index 0929d0bbd5..09a8aba46f 100644
--- a/widgets/misc/e-combo-button.c
+++ b/widgets/misc/e-combo-button.c
@@ -51,17 +51,6 @@ struct _EComboButtonPrivate {
#define SPACING 2
-static const char *arrow_xpm[] = {
- "11 5 2 1",
- " c none",
- ". c #000000000000",
- " ......... ",
- " ....... ",
- " ..... ",
- " ... ",
- " . ",
-};
-
#define PARENT_TYPE gtk_button_get_type ()
static GtkButtonClass *parent_class = NULL;
@@ -108,21 +97,6 @@ create_empty_pixmap_widget (void)
return pixmap_widget;
}
-static GtkWidget *
-create_arrow_pixmap_widget (void)
-{
- GtkWidget *pixmap_widget;
- GdkPixbuf *pixbuf;
-
- pixbuf = gdk_pixbuf_new_from_xpm_data (arrow_xpm);
-
- pixmap_widget = create_pixmap_widget_from_pixbuf (pixbuf);
-
- g_object_unref (pixbuf);
-
- return pixmap_widget;
-}
-
static void
set_icon (EComboButton *combo_button,
GdkPixbuf *pixbuf)
@@ -453,7 +427,7 @@ init (EComboButton *combo_button)
2 * GTK_WIDGET (combo_button)->style->xthickness);
gtk_widget_show (priv->label);
- priv->arrow_pixmap = create_arrow_pixmap_widget ();
+ priv->arrow_pixmap = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (priv->hbox), priv->arrow_pixmap, TRUE, TRUE,
GTK_WIDGET (combo_button)->style->xthickness);
gtk_widget_show (priv->arrow_pixmap);
diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c
index 673a22f297..92d794b528 100644
--- a/widgets/misc/e-filter-bar.c
+++ b/widgets/misc/e-filter-bar.c
@@ -214,7 +214,6 @@ menubar_activated (ESearchBar *esb, int id, void *data)
efb->save_dialogue = gd;
gnome_dialog_set_default (GNOME_DIALOG (gd), 0);
gtk_window_set_default_size (GTK_WINDOW (gd), 600, 300);
- gtk_window_set_policy (GTK_WINDOW (gd), FALSE, TRUE, FALSE);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (gd)->vbox), w, TRUE, TRUE, 0);
gtk_widget_show (gd);
diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c
index bfcff578bd..647c5c74b4 100644
--- a/widgets/misc/e-url-entry.c
+++ b/widgets/misc/e-url-entry.c
@@ -27,7 +27,6 @@
#include <gtk/gtk.h>
#include <libgnome/gnome-url.h>
-#include "art/connect_to_url-16.xpm"
#include "e-url-entry.h"
struct _EUrlEntryPrivate {
@@ -86,9 +85,6 @@ static void
init (EUrlEntry *url_entry)
{
EUrlEntryPrivate *priv;
- GdkColormap *colormap;
- GdkPixmap *url_icon;
- GdkBitmap *url_mask;
GtkWidget *pixmap;
priv = g_new0 (EUrlEntryPrivate, 1);
@@ -98,13 +94,7 @@ init (EUrlEntry *url_entry)
gtk_box_pack_start (GTK_BOX (url_entry), priv->entry, TRUE, TRUE, 0);
priv->button = gtk_button_new ();
gtk_box_pack_start (GTK_BOX (url_entry), priv->button, FALSE, FALSE, 0);
-
- colormap = gtk_widget_get_colormap (GTK_WIDGET (priv->button));
- url_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap,
- &url_mask, NULL,
- connect_to_url_16_xpm);
-
- pixmap = gtk_pixmap_new (url_icon, url_mask);
+ pixmap = gtk_image_new_from_file (MAP_DIR "/connect_to_url-16.xpm");
gtk_container_add (GTK_CONTAINER (priv->button), pixmap);
gtk_widget_show (pixmap);