Ticket #596: gui_internal.c.diff

File gui_internal.c.diff, 1.6 KB (added by number6, 12 years ago)

gui_internal.c.diff.correct_folder

Line 
1Index: navit/gui/internal/gui_internal.c
2===================================================================
3--- navit/gui/internal/gui_internal.c (revision 3625)
4+++ navit/gui/internal/gui_internal.c (working copy)
5@@ -3000,6 +3000,9 @@
6gui_internal_cmd_paste_bookmark, NULL);
7gui_internal_widget_append(w, wbm);
8bookmarks_item_rewind(mattr.u.bookmarks);
9+ struct widget *tbl, *row;
10+ tbl=gui_internal_widget_table_new(this,gravity_left_top | flags_fill | flags_expand |orientation_vertical,1);
11+ gui_internal_widget_append(w,tbl);
12while ((item=bookmarks_get_item(mattr.u.bookmarks))) {
13if (!item_attr_get(item, attr_label, &attr)) continue;
14label_full=attr.u.str;
15@@ -3009,9 +3012,11 @@
16} else {
17hassub=0;
18}
19+ row=gui_internal_widget_table_row_new(this,gravity_left| flags_fill| orientation_horizontal);
20wbm=gui_internal_button_new_with_callback(this, label_full,
21image_new_xs(this, hassub ? "gui_inactive" : "gui_active" ), gravity_left_center|orientation_horizontal|flags_fill,
22hassub ? gui_internal_cmd_bookmarks : gui_internal_cmd_position, NULL);
23+ row->children=g_list_append(row->children,wbm);
24if (item_coord_get(item, &c, 1)) {
25wbm->c.x=c.x;
26wbm->c.y=c.y;
27@@ -3021,10 +3026,10 @@
28if (!hassub) {
29wbm->data=(void*)7;//Mark us as a bookmark
30}
31- gui_internal_widget_append(w, wbm);
32+ gui_internal_widget_append(tbl, row);
33wbm->prefix=g_strdup(label_full);
34} else {
35- gui_internal_widget_destroy(this, wbm);
36+ gui_internal_widget_destroy(this, row);
37}
38}
39}
40@@ -3036,7 +3041,6 @@
41else
42gui_internal_menu_render(this);
43}
44-
45static void
46gui_internal_cmd2_bookmarks(struct gui_priv *this, char *function, struct attr **in, struct attr ***out, int *valid)
47{