diff options
Diffstat (limited to 'widgets/e-minicard')
-rw-r--r-- | widgets/e-minicard/e-minicard-label.c | 32 | ||||
-rw-r--r-- | widgets/e-minicard/e-minicard.c | 4 | ||||
-rw-r--r-- | widgets/e-minicard/e-reflow.c | 4 | ||||
-rw-r--r-- | widgets/e-minicard/test-reflow.c | 4 |
4 files changed, 23 insertions, 21 deletions
diff --git a/widgets/e-minicard/e-minicard-label.c b/widgets/e-minicard/e-minicard-label.c index 7e32acad59..0c4078f69f 100644 --- a/widgets/e-minicard/e-minicard-label.c +++ b/widgets/e-minicard/e-minicard-label.c @@ -188,26 +188,22 @@ e_minicard_label_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) GTK_VALUE_BOOL (*arg) = e_minicard_label->has_focus; break; case ARG_FIELD: - if ( e_minicard_label->field ) - { - gtk_object_get( GTK_OBJECT( e_minicard_label->field ), "text", &temp, NULL ); - GTK_VALUE_STRING (*arg) = temp; - } - else - GTK_VALUE_STRING (*arg) = g_strdup( e_minicard_label->field_text ); - break; + if ( e_minicard_label->field ) { + gtk_object_get( GTK_OBJECT( e_minicard_label->field ), "text", &temp, NULL ); + GTK_VALUE_STRING (*arg) = temp; + } else + GTK_VALUE_STRING (*arg) = g_strdup( e_minicard_label->field_text ); + break; case ARG_FIELDNAME: - if ( e_minicard_label->fieldname ) - { - gtk_object_get( GTK_OBJECT( e_minicard_label->fieldname ), "text", &temp, NULL ); - GTK_VALUE_STRING (*arg) = temp; - } - else - GTK_VALUE_STRING (*arg) = g_strdup( e_minicard_label->fieldname_text ); - break; + if ( e_minicard_label->fieldname ) { + gtk_object_get( GTK_OBJECT( e_minicard_label->fieldname ), "text", &temp, NULL ); + GTK_VALUE_STRING (*arg) = temp; + } else + GTK_VALUE_STRING (*arg) = g_strdup( e_minicard_label->fieldname_text ); + break; default: - arg->type = GTK_TYPE_INVALID; - break; + arg->type = GTK_TYPE_INVALID; + break; } } diff --git a/widgets/e-minicard/e-minicard.c b/widgets/e-minicard/e-minicard.c index f656d98b40..b6de4b2d0c 100644 --- a/widgets/e-minicard/e-minicard.c +++ b/widgets/e-minicard/e-minicard.c @@ -357,7 +357,9 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) } break; case GDK_KEY_PRESS: - if (event->key.length == 1 && event->key.string[0] == '\t') { + if (event->key.keyval == GDK_Tab || + event->key.keyval == GDK_KP_Tab || + event->key.keyval == GDK_ISO_Left_Tab) { GList *list; for (list = e_minicard->fields; list; list = list->next) { GnomeCanvasItem *item = GNOME_CANVAS_ITEM (list->data); diff --git a/widgets/e-minicard/e-reflow.c b/widgets/e-minicard/e-reflow.c index e9ff1b6eaa..41be2ec533 100644 --- a/widgets/e-minicard/e-reflow.c +++ b/widgets/e-minicard/e-reflow.c @@ -238,7 +238,9 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) switch( event->type ) { case GDK_KEY_PRESS: - if (event->key.length == 1 && event->key.string[0] == '\t') { + if (event->key.keyval == GDK_Tab || + event->key.keyval == GDK_KP_Tab || + event->key.keyval == GDK_ISO_Left_Tab) { GList *list; for (list = e_reflow->items; list; list = list->next) { GnomeCanvasItem *item = GNOME_CANVAS_ITEM (list->data); diff --git a/widgets/e-minicard/test-reflow.c b/widgets/e-minicard/test-reflow.c index 067e520754..9efc2722dd 100644 --- a/widgets/e-minicard/test-reflow.c +++ b/widgets/e-minicard/test-reflow.c @@ -20,6 +20,7 @@ #include "config.h" #include <gnome.h> +#include "e-canvas.h" #include "e-reflow.h" #include "e-minicard.h" @@ -99,7 +100,7 @@ int main( int argc, char *argv[] ) vbox = gtk_vbox_new(FALSE, 0); - canvas = gnome_canvas_new(); + canvas = e_canvas_new(); rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), gnome_canvas_rect_get_type(), "x1", (double) 0, @@ -147,6 +148,7 @@ int main( int argc, char *argv[] ) ( gpointer ) app ); gtk_widget_show_all( app ); + gdk_window_set_back_pixmap( GTK_LAYOUT(canvas)->bin_window, NULL, FALSE); gtk_main(); |