aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/misc/ChangeLog13
-rw-r--r--widgets/misc/e-combo-cell-editable.c41
2 files changed, 42 insertions, 12 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index e26b944509..8c30d8ec92 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,16 @@
+2005-01-19 Harry Lu <harry.lu@sun.com>
+
+ Fix for 46359, enable "Alt+Down Arrow" to show the popup for
+ e-combo-cell-editable.c.
+
+ * e-combo-cell-editable.c: (show_popup): rewrite it to a more
+ generic function.
+ (button_clicked_cb): call the new show_popup function.
+ (entry_key_press_event_cb): show popup if "Alt+Down Arrow".
+ (ecce_grab_focus): new function.
+ (ecce_class_init): add grab_focus handler so that the entry
+ can get focus.
+
2005-01-17 Harry Lu <harry.lu@sun.com>
Fix for 62831.
diff --git a/widgets/misc/e-combo-cell-editable.c b/widgets/misc/e-combo-cell-editable.c
index f8de7c9ebc..5a39974f17 100644
--- a/widgets/misc/e-combo-cell-editable.c
+++ b/widgets/misc/e-combo-cell-editable.c
@@ -225,9 +225,11 @@ position_popup (EComboCellEditable *ecce, gint x, gint y, gint offset)
}
static void
-show_popup (EComboCellEditable *ecce, gint x, gint y, gint offset)
+show_popup (EComboCellEditable *ecce)
{
gint row;
+ GtkAllocation alloc;
+ gint x, y;
if (!ecce->priv->list)
return;
@@ -236,7 +238,11 @@ show_popup (EComboCellEditable *ecce, gint x, gint y, gint offset)
row = lookup_row (ecce->priv->list, e_combo_cell_editable_get_text (ecce));
set_cursor (ecce->priv->tree_view, row);
- position_popup (ecce, x, y, offset);
+ gtk_editable_select_region (GTK_EDITABLE (ecce->priv->entry), 0, 0);
+ gdk_window_get_origin (GTK_WIDGET (ecce)->window, &x, &y);
+ alloc = GTK_WIDGET (ecce)->allocation;
+
+ position_popup (ecce, x, y + alloc.height, alloc.height);
gtk_grab_add (GTK_WIDGET (ecce->priv->popup));
gtk_widget_grab_focus (GTK_WIDGET (ecce->priv->tree_view));
@@ -246,21 +252,12 @@ show_popup (EComboCellEditable *ecce, gint x, gint y, gint offset)
static void
button_clicked_cb (GtkButton *btn, EComboCellEditable *ecce)
{
- GtkAllocation alloc;
- gint x, y;
-
if (ecce->priv->popup) {
kill_popup (ecce);
return;
}
-
- gtk_editable_select_region (GTK_EDITABLE (ecce->priv->entry), 0, 0);
-
- gdk_window_get_origin (GTK_WIDGET (ecce)->window, &x, &y);
-
- alloc = GTK_WIDGET (ecce)->allocation;
- show_popup (ecce, x, y + alloc.height, alloc.height);
+ show_popup (ecce);
}
static void
@@ -280,6 +277,14 @@ entry_key_press_event_cb (GtkEntry *entry, GdkEventKey *key_event, EComboCellEdi
return TRUE;
}
+ if (key_event->state & GDK_MOD1_MASK
+ && key_event->keyval == GDK_Down) {
+ if (!ecce->priv->popup)
+ show_popup (ecce);
+
+ return TRUE;
+ }
+
return FALSE;
}
@@ -336,10 +341,22 @@ ecce_init (EComboCellEditable *ecce)
}
static void
+ecce_grab_focus (GtkWidget *widget)
+{
+ EComboCellEditable *ecce = E_COMBO_CELL_EDITABLE (widget);
+
+ gtk_widget_grab_focus (GTK_WIDGET (ecce->priv->entry));
+}
+
+static void
ecce_class_init (GObjectClass *klass)
{
+ GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
+
klass->finalize = ecce_finalize;
+ widget_class->grab_focus = ecce_grab_focus;
+
parent_class = GTK_EVENT_BOX_CLASS (g_type_class_peek_parent (klass));
}
eletions'>-0/+21 * Now gettext 0.12.1 is gettext-old.trevor2004-01-243-3/+3 * - Add inn-current, 20040118 snapshotclement2004-01-226-66/+110 * - Update to 0.9.11clement2004-01-222-2/+2 * Use PAX macro.trevor2004-01-221-1/+1 * Fix build on -STABLEarved2004-01-192-0/+14 * - Update to 20040118 snapshotclement2004-01-193-29/+4 * - Chase uulib versionclement2004-01-181-1/+2 * Update to 1.1.92arved2004-01-173-22/+2 * - Update to 1.9.49clement2004-01-102-2/+2 * - update to 0.8.3petef2004-01-094-30/+30 * - Update to 1.9.48clement2004-01-092-2/+2 * - Update to 2.4.1 (urgent release)clement2004-01-083-14/+12 * - Fix potentially exploitable buffer overflow.clement2004-01-082-1/+26 * - Drop maintainership to ports@krion2004-01-081-1/+1 * - Update to 1.9.47, tons of bugfixeskrion2004-01-073-5/+6 * - Update to 1.8clement2004-01-073-2/+5 * makes these ports "portlint clean".leeym2004-01-061-2/+2 * - Update to 0.9.10clement2004-01-053-8/+12 * - Update to version 0.26krion2003-12-302-2/+2 * Update to 1.1.5 snapshot (as of 24 Dec 2003).fjoe2003-12-2617-244/+47 * - Fix MASTER_SITESdinoex2003-12-241-1/+1 * Update to 0.70.fjoe2003-12-232-3/+3 * - Use canonical form (ports@FreeBSD.org) in MAINTAINER linesergei2003-12-211-1/+1 * Fix a bug leading to SIG11 in the child processarved2003-12-102-4/+14 * - Update to 1.9.46krion2003-12-082-3/+3 * Restyle maintainer address to @FreeBSD.org.linimon2003-12-071-2/+2 * - Update to version 0.25krion2003-11-212-2/+4 * Changelog:linimon2003-11-213-20/+54 * Changelog:linimon2003-11-212-17/+54 * Fix build with gcc 3.x.knu2003-11-213-7/+41 * - Update to 1.7 (bugfix release)sergei2003-11-202-2/+2 * Reset unreachable MAINTAINERs to ports@FreeBSD.orgeik2003-11-201-1/+1 * - Fix gcc33 problemsdinoex2003-11-193-0/+51 * - Update MASTER_SITES and WWW: linekrion2003-11-194-8/+10 * - Update to version 1.6krion2003-11-183-8/+11 * USE_REINPLACE need be defined only when REINPLACE_CMD is used.trevor2003-11-171-1/+0 * - Fix PATCH_SITESdinoex2003-11-171-2/+1 * Allow the default compiled-in editor to be easily changed.obrien2003-11-131-1/+2 * - update MASTER_SITESdinoex2003-11-121-2/+2 * - Update to version 1.0.4krion2003-11-113-7/+7 * - Fix build on -currentkrion2003-11-111-7/+2 * Remove pan, as the new stable release has been rolled into pan2.marcus2003-11-038-133/+0 * Fix templates handling.fjoe2003-11-022-0/+12 * ports with possibly unreachable MAINTAINERsedwin2003-11-021-1/+1 * Maintainer update [1]:sergei2003-11-014-65/+59 * - Fix handling USE_GETOPT_LONGkrion2003-11-012-3/+43 * Move dependency on perl to hpt.fjoe2003-10-282-7/+7 * Update to 1.1.90arved2003-10-286-56/+9 * - Fix build on 5.xkrion2003-10-271-0/+10 * Forgot to reset PORTREVISION.fjoe2003-10-261-1/+0 * Update to 1.2.4.fjoe2003-10-262-4/+3 * Update to 2.2.4.fjoe2003-10-262-3/+3 * Update to 1.10.4.fjoe2003-10-262-4/+3 * Update to 1.2.4.fjoe2003-10-268-13/+12 * Update to 1.0.4.fjoe2003-10-264-6/+6 * Update to 0.14.4.fjoe2003-10-262-3/+3 * Update to 0.2.4.fjoe2003-10-262-4/+3 * utilize SITE_PERLijliao2003-10-2410-62/+59 * Respect CC and CFLAGSkris2003-10-231-5/+7 * - Use EXAMPLESDIR, DOCSDIR.fjoe2003-10-202-119/+123 * Fix pkg-descr.fjoe2003-10-202-6/+5 * New port: golded+fjoe2003-10-2018-0/+404 * BROKEN on 5.x: does not compilekris2003-10-162-2/+16 * - Update to version 1.5krion2003-10-142-2/+2 * patch news/newsx: adding conflict with news/leafnode.daichi2003-10-141-0/+2 * - Update to version 1.4krion2003-10-122-2/+2 * - add CONFLICTSdinoex2003-10-121-0/+3 * - use DOCSDIRdinoex2003-10-121-11/+11 * - use DOCSDIR and EXAMPLESDIRdinoex2003-10-121-162/+162 * - use DOCSDIR and EXAMPLESDIRdinoex2003-10-121-148/+148 * - update to 0.9.8.0 [0]petef2003-10-125-43/+126 * New Port: news/rawdog: A simple RSS aggregatoredwin2003-10-085-0/+72 * - Update to 0.24.2krion2003-10-055-17/+12 * Upgrade to 1.6.2ache2003-10-042-3/+2 * - remove defunct urldinoex2003-10-041-2/+0 * update news/inn-stable:daichi2003-09-282-0/+27 * update news/inn:daichi2003-09-284-4/+56 * Bump port revision.fjoe2003-09-281-0/+1 * Fix 'Show Address' switch. Patch is submitted to author.fjoe2003-09-281-0/+31 * Do not use internal fidoconfig parser.fjoe2003-09-282-23/+12 * Take maintainershipkris2003-09-281-1/+1 * Use PCRE from portsache2003-09-282-118/+4 * - Update to 0.45 [1]erwin2003-09-272-3/+9 * KATO mega patchedwin2003-09-273-14/+14 * update news/inn-stable:daichi2003-09-266-43/+226 * update: news/inndaichi2003-09-2610-64/+436 * Replace an erroneous ECHO with ECHO_MSG. While I'm here, use DOCSDIR astom2003-09-252-9/+9 * - MASTER_STE_LOCALdinoex2003-09-251-1/+3 * - change ECHO -> ECHO_MSGdinoex2003-09-251-10/+10 * Make portlint(1) happy by changing strip to ${STRIP_CMD}osa2003-09-241-2/+2 * Cease FreeBSD port maintainershipsedwin2003-09-241-1/+1 * Maintainer update: add a faster mirror for distfiles/patches.osa2003-09-091-1/+2 * Specify RUN_DEPENDS explicitly.fjoe2003-09-091-1/+1 * - Add USE_AUTOCONF=yestaoka2003-09-061-1/+2 * - Update to version 1.9.43krion2003-09-054-32/+38 * Update to 0.14.2.marcus2003-09-052-2/+2 * Add optional CANLOCK functionalityache2003-08-302-0/+17 * - use hook for bsd.openssl.mkdinoex2003-08-281-4/+3 * Update to 0.14.1.marcus2003-08-282-3/+2 * Bump the PORTREVISION for the ports directly affected by the gettext upgrade.marcus2003-08-273-1/+3 * Chase the libintl.so shared lib version.marcus2003-08-253-3/+3 * Update to 0.14.0.96.marcus2003-08-212-2/+2 * Update to 6.16.2.02.nork2003-08-203-14/+4 * Add knob to make you choose your ldap version.kuriyama2003-08-161-2/+4 * Utilize INFO and bump PORTREVISION.kris2003-08-162-31/+2 * Update to 0.14.0.95.marcus2003-08-162-3/+2 * Reset bouncing maintainer address ("Host not found")kris2003-08-161-1/+1 * Upgrade to 1.6.1ache2003-08-162-23/+23