[Gnucash-changes] 2005-03-13 Joshua Sled <jsled@asynchronous.org> *
GNOME2_STATUS:
Joshua Sled
jsled at cvs.gnucash.org
Sun Mar 13 17:10:53 EST 2005
Log Message:
-----------
2005-03-13 Joshua Sled <jsled at asynchronous.org>
* GNOME2_STATUS: Updates; removed some incorrectness, updated for
other changes. Added many new things. :(
* src/register/register-gnome/gnucash-item-edit.c
(gnc_item_edit_set_cursor_pos): Fix reverse dragging/selection,
broken because of a change in gtk_editable semantics. :(
(gnc_item_edit_draw_info): Turn off pango line wrapping.
Tags:
----
gnucash-gnome2-dev
Modified Files:
--------------
gnucash:
ChangeLog
GNOME2_STATUS
gnucash/src/register/register-gnome:
gnucash-item-edit.c
gnucash-item-edit.h
Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.182
retrieving revision 1.1487.2.183
diff -LChangeLog -LChangeLog -u -r1.1487.2.182 -r1.1487.2.183
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,13 @@
+2005-03-13 Joshua Sled <jsled at asynchronous.org>
+
+ * GNOME2_STATUS: Updates; removed some incorrectness, updated for
+ other changes. Added many new things. :(
+
+ * src/register/register-gnome/gnucash-item-edit.c
+ (gnc_item_edit_set_cursor_pos): Fix reverse dragging/selection,
+ broken because of a change in gtk_editable semantics. :(
+ (gnc_item_edit_draw_info): Turn off pango line wrapping.
+
2005-03-07 Neil Williams <linux at codehelp.co.uk>
* ./src/engine/qofsession.c:Fixing references
and empty partial books
Index: GNOME2_STATUS
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/Attic/GNOME2_STATUS,v
retrieving revision 1.1.2.40
retrieving revision 1.1.2.41
diff -LGNOME2_STATUS -LGNOME2_STATUS -u -r1.1.2.40 -r1.1.2.41
--- GNOME2_STATUS
+++ GNOME2_STATUS
@@ -69,33 +69,21 @@
- Main Window
- - View Summary Bar
+ - Initially-loaded file name not in window title.
+
+ - Summary Bar
- Summarybar restored into GncMainWindow UI; summary-select list does not
respond to button-pressing.
+ - View > Summary Bar (toggle) menu option has no effect.
+
- [low-priority] New registers should open in new top-level windows.
- Register Core - mostly functional
- Insertion point not shown. (fix gnucash-item-edit.c)
- - <STRIKE>Cannot hilight text with mouse (fix gnucash-item-edit.c)</STRIKE>
-
- - Getting better; x-position -> pango-text-index-lookup works; some
- gtk_entry selection works.
-
- - draging from right to left doesn't work.
-
- - Offset for non-LEFT_ALIGN'ed fields not correct.
-
- - Probably need to...
- 1. check if it's a RIGHT [or CENTER] align.
- 2. determine pango-layout width of the cell, plus the "indent".
- 3. subtract the indent as well as the cell's x-offset from the x-coord.
-
- - finer points of gtk_entry selection+position setting not correct, yet.
-
- The first time it is used, the account popup immediately selects the
first account. After that it functions normally.
@@ -108,15 +96,42 @@
(gnucash:26380): GLib-GObject-WARNING **: gsignal.c:989: no emission of
signal "key-press-event" to stop for instance `0x855a240'
- - Word wrap on transaction cells appears to be on. Eg. Long account names
- are truncated to the last space. Specifically an account Named:
- "Assets:XXXXXX Credit Union:XXXXXXX" is truncated to "Assets:XXXXXX
- Credit" with no hope of seeing the remainder of the text. PJK
+- Reconcile
+
+ - Crash after initial value-prompting dialog:
+
+ #0 0x400f65e8 in waitpid () from /lib/libpthread.so.0
+ #1 0x405e8a90 in ?? () from /usr/lib/libgnomeui-2.so.0
+ #2 0x405ab116 in libgnomeui_module_info_get () from /usr/lib/libgnomeui-2.so.0
+ #3 0x400f5393 in __pthread_clock_settime () from /lib/libpthread.so.0
+ #4 <signal handler called>
+ #5 0x40d88809 in gnc_xfer_dialog_show_inc_exp_visible_cb (account=0x84d8cc8, data=0x8522a28) at dialog-transfer.c:414
+ #6 0x40dc0877 in gnc_tree_view_account_filter_helper (model=0x855e828, iter=0xbfffdc70, data=0x855e828) at gnc-tree-view-account.c:718
+ #7 0x40430d46 in egg_tree_model_filter_visible (filter=0x854bce0, child_iter=0xbfffdc70) at eggtreemodelfilter.c:618
+ #8 0x404341de in egg_tree_model_filter_row_changed (c_model=0x84aa138, c_path=0x8620470, c_iter=0x8640c60, data=0x84d8cc8) at eggtreemodelfilter.c:990
+ #9 0x40a7e185 in _gtk_marshal_VOID__BOXED_BOXED () from /usr/lib/libgtk-x11-2.0.so.0
+ #10 0x40313310 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
+ #11 0x40327076 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
+ #12 0x40326047 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
+
+- Find - mostly functional; creating a search creates a search results tab in
+ the main window, seemingly populated correctly.
+
+ - There's no way to edit/refine a search.
+
+- Transfer
-- Find - somewhat functional
+ - Top 5 fields and don't expand width-wise.
- - Can generate a query in the dialog; but it seems to not work or crash on
- query-execution.
+ - Bottom 2 fields [Currency Transfer] don't expand width-wise.
+
+- View Lots
+
+ - Dialog opens too small [whole bottom panel is invisible]
+
+ - Weird toolbar/menubar/action-list thingy at top.
+
+ - [HIG] no "ok/cancel" buttons in dialog.
- Business Functions
@@ -130,7 +145,7 @@
- Reporting [somewhat functional]
- Graphing still unsupported; [jsled] in periodic contact with Jody
- Goldberg of Gnumeric regarding Gnume Office Graphing [GOG] to be factored
+ Goldberg of Gnumeric regarding Gnome Office Graphing [GOG] to be factored
out of gnumeric into libgoffice.
- Save/restore in unknown state; believed to crash on re-start.
@@ -160,9 +175,26 @@
- Preferences
- - Business -> Accumulate splits on Post? option not present. Not sure if
- this is intentionally missing. PJK [ tested after g2 merge of 30 Dec 04?
- -derek ]
+ - General
+
+ - Window size/position not being saved or used.
+
+ - Business
+
+ - Business -> Accumulate splits on Post? option not present. Not sure if
+ this is intentionally missing. PJK [ tested after g2 merge of 30 Dec 04?
+ -derek ]
+
+ - Account Tree Options
+
+ - dialog doesn't expand/fill on resize
+
+ - changing displayed columns has strange effects (some columns being
+ added, some not, some seeming off-by-one errors, &c.)
+
+ - Stylesheets
+
+ - Dialog opens with inappropriate scrollbars.
- Hierarchy Merge - BROKEN
@@ -180,7 +212,7 @@
- Report
- - "Report options", especially, since it continuouly confuses users.
+ - "Report options", especially, since it often confuses users.
- Preferences
Index: gnucash-item-edit.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-item-edit.h,v
retrieving revision 1.1.6.3
retrieving revision 1.1.6.4
diff -Lsrc/register/register-gnome/gnucash-item-edit.h -Lsrc/register/register-gnome/gnucash-item-edit.h -u -r1.1.6.3 -r1.1.6.4
--- src/register/register-gnome/gnucash-item-edit.h
+++ src/register/register-gnome/gnucash-item-edit.h
@@ -104,6 +104,8 @@
gboolean reset_pos;
gint x_offset;
+ enum { UNKNOWN, FORWARD, REVERSE } selection_dir;
+
/* Where are we */
VirtualLocation virt_loc;
Index: gnucash-item-edit.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-item-edit.c,v
retrieving revision 1.1.6.9
retrieving revision 1.1.6.10
diff -Lsrc/register/register-gnome/gnucash-item-edit.c -Lsrc/register/register-gnome/gnucash-item-edit.c -u -r1.1.6.9 -r1.1.6.10
--- src/register/register-gnome/gnucash-item-edit.c
+++ src/register/register-gnome/gnucash-item-edit.c
@@ -195,7 +195,12 @@
info->text_rect.y = dy + 1;
info->text_rect.width = wd - toggle_space;
info->text_rect.height = hd - 2;
- pango_layout_set_width (info->layout, (wd - toggle_space - 2 * CELL_HPADDING) * PANGO_SCALE);
+
+ // this width affects line-wrapping; setting it to -1 should turn wrapping off:
+ pango_layout_set_width( info->layout, -1 );
+
+ // pango_layout_set_ellipsize(...) as of pango 1.6 may be useful for
+ // strings longer than the field width.
switch (gnc_table_get_align (table, item_edit->virt_loc))
{
@@ -651,12 +656,12 @@
gboolean
gnc_item_edit_set_cursor_pos (GncItemEdit *item_edit,
- VirtualLocation virt_loc, int x,
- gboolean changed_cells,
- gboolean extend_selection)
+ VirtualLocation virt_loc,
+ int x,
+ gboolean changed_cells,
+ gboolean extend_selection)
{
GtkEditable *editable;
- // TextDrawInfo info;
Table *table;
gint pos = 0;
gint o_x, o_y;
@@ -698,59 +703,88 @@
x -= item_edit->popup_toggle.toggle_offset;
}
- // WTF!? All the `pos` setting logic has been silently removed from
- // this location. Compare to 1.8 sources... *grumble*
+
+ // get the text index for the mouse position into pos
{
- PangoLayout *pl;
+ PangoLayout *layout;
int textIndex, textTrailing;
gboolean insideText;
- pl = gtk_entry_get_layout( GTK_ENTRY(item_edit->editor) );
- insideText = pango_layout_xy_to_index( pl, (x - o_x) * PANGO_SCALE,
- 10 * PANGO_SCALE, &textIndex, &textTrailing );
+ layout = gtk_entry_get_layout( GTK_ENTRY(item_edit->editor) );
+ insideText = pango_layout_xy_to_index( layout,
+ (x - o_x) * PANGO_SCALE, 10 * PANGO_SCALE,
+ &textIndex, &textTrailing );
pos = textIndex;
}
- // I think we can remove the TextDrawInfo-related stuff since Pango handles it, and better.
- //gnc_item_edit_draw_info (item_edit, o_x, o_y, &info);
-
if (extend_selection)
{
+ // Setting the selection-range on the GtkEditable implicitly
+ // sets the `position` to the end of the range; this is
+ // unfortunate if you're setting and using the `position` to
+ // be at the end or beginning of the selection range to
+ // discriminate the forward- or reverse- nature of the
+ // dragging. Now we just keep even-more-explicit enumeration
+ // of the selection-direction. -- jsled, Mar 2005, Gnome2 port
+
gboolean selection_exists;
- gint current_pos, start_sel, end_sel;
+ gint current_pos, start_sel, end_sel, orig_start, orig_end;
current_pos = gtk_editable_get_position (editable);
selection_exists = gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
+ orig_start = start_sel;
+ orig_end = end_sel;
- if (start_sel == end_sel)
+ if ( item_edit->selection_dir == UNKNOWN && start_sel == end_sel )
{
start_sel = current_pos;
end_sel = pos;
}
- else if (current_pos == start_sel)
+
+ // determine direction
+ if ( item_edit->selection_dir == UNKNOWN )
+ {
+ if ( pos < start_sel )
+ {
+ item_edit->selection_dir = REVERSE;
+ }
+ else if ( pos > end_sel )
+ {
+ item_edit->selection_dir = FORWARD;
+ }
+ }
+
+ // act accordingly
+ if ( item_edit->selection_dir == FORWARD )
+ {
+ end_sel = pos;
+ }
+ else if ( item_edit->selection_dir == REVERSE )
{
start_sel = pos;
}
else
{
- end_sel = pos;
+ // @@FIXME : don't printf... so ghetto.
+ printf( "unknown, but with movement\n" );
}
gtk_editable_set_position (editable, pos);
+
gtk_editable_select_region(editable, start_sel, end_sel);
- selection_exists = gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
+ pos = gtk_editable_get_position (editable);
+ selection_exists = gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
}
else
{
gtk_editable_select_region(editable, 0, 0);
gtk_editable_set_position (editable, pos);
+ item_edit->selection_dir = UNKNOWN;
}
queue_sync (item_edit);
- //gnc_item_edit_free_draw_info_members(&info);
-
return TRUE;
}
More information about the gnucash-changes
mailing list