comparison src/ui_bookmark.c @ 1446:a6f9ba6fd751

gint -> gboolean.
author zas_
date Sun, 15 Mar 2009 18:06:41 +0000
parents 8b89e3ff286b
children 956aab097ea7
comparison
equal deleted inserted replaced
1445:cb0040be832e 1446:a6f9ba6fd751
59 gchar *key; 59 gchar *key;
60 60
61 void (*select_func)(const gchar *path, gpointer data); 61 void (*select_func)(const gchar *path, gpointer data);
62 gpointer select_data; 62 gpointer select_data;
63 63
64 gint no_defaults; 64 gboolean no_defaults;
65 gint editable; 65 gboolean editable;
66 gint only_directories; 66 gboolean only_directories;
67 67
68 BookButtonData *active_button; 68 BookButtonData *active_button;
69 }; 69 };
70 70
71 struct _BookButtonData 71 struct _BookButtonData
387 gdk_window_get_origin(button->window, x, y); 387 gdk_window_get_origin(button->window, x, y);
388 *y += button->allocation.y + button->allocation.height; 388 *y += button->allocation.y + button->allocation.height;
389 } 389 }
390 390
391 static void bookmark_menu_popup(BookMarkData *bm, GtkWidget *button, 391 static void bookmark_menu_popup(BookMarkData *bm, GtkWidget *button,
392 gint button_n, guint32 time, gint local) 392 gint button_n, guint32 time, gboolean local)
393 { 393 {
394 GtkWidget *menu; 394 GtkWidget *menu;
395 BookButtonData *b; 395 BookButtonData *b;
396 396
397 b = g_object_get_data(G_OBJECT(button), "bookbuttondata"); 397 b = g_object_get_data(G_OBJECT(button), "bookbuttondata");
418 { 418 {
419 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, button_n, time); 419 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, button_n, time);
420 } 420 }
421 } 421 }
422 422
423 static gint bookmark_press_cb(GtkWidget *button, GdkEventButton *event, gpointer data) 423 static gboolean bookmark_press_cb(GtkWidget *button, GdkEventButton *event, gpointer data)
424 { 424 {
425 BookMarkData *bm = data; 425 BookMarkData *bm = data;
426 426
427 if (event->button != MOUSE_BUTTON_RIGHT) return FALSE; 427 if (event->button != MOUSE_BUTTON_RIGHT) return FALSE;
428 428
429 bookmark_menu_popup(bm, button, event->button, event->time, FALSE); 429 bookmark_menu_popup(bm, button, event->button, event->time, FALSE);
430 430
431 return TRUE; 431 return TRUE;
432 } 432 }
433 433
434 static gint bookmark_keypress_cb(GtkWidget *button, GdkEventKey *event, gpointer data) 434 static gboolean bookmark_keypress_cb(GtkWidget *button, GdkEventKey *event, gpointer data)
435 { 435 {
436 BookMarkData *bm = data; 436 BookMarkData *bm = data;
437 437
438 switch (event->keyval) 438 switch (event->keyval)
439 { 439 {
782 bm->key = g_strdup(key); 782 bm->key = g_strdup(key);
783 783
784 bookmark_populate(bm); 784 bookmark_populate(bm);
785 } 785 }
786 786
787 void bookmark_list_set_no_defaults(GtkWidget *list, gint no_defaults) 787 void bookmark_list_set_no_defaults(GtkWidget *list, gboolean no_defaults)
788 { 788 {
789 BookMarkData *bm; 789 BookMarkData *bm;
790 790
791 bm = g_object_get_data(G_OBJECT(list), BOOKMARK_DATA_KEY); 791 bm = g_object_get_data(G_OBJECT(list), BOOKMARK_DATA_KEY);
792 if (!bm) return; 792 if (!bm) return;
793 793
794 bm->no_defaults = no_defaults; 794 bm->no_defaults = no_defaults;
795 } 795 }
796 796
797 void bookmark_list_set_editable(GtkWidget *list, gint editable) 797 void bookmark_list_set_editable(GtkWidget *list, gboolean editable)
798 { 798 {
799 BookMarkData *bm; 799 BookMarkData *bm;
800 800
801 bm = g_object_get_data(G_OBJECT(list), BOOKMARK_DATA_KEY); 801 bm = g_object_get_data(G_OBJECT(list), BOOKMARK_DATA_KEY);
802 if (!bm) return; 802 if (!bm) return;
803 803
804 bm->editable = editable; 804 bm->editable = editable;
805 } 805 }
806 806
807 void bookmark_list_set_only_directories(GtkWidget *list, gint only_directories) 807 void bookmark_list_set_only_directories(GtkWidget *list, gboolean only_directories)
808 { 808 {
809 BookMarkData *bm; 809 BookMarkData *bm;
810 810
811 bm = g_object_get_data(G_OBJECT(list), BOOKMARK_DATA_KEY); 811 bm = g_object_get_data(G_OBJECT(list), BOOKMARK_DATA_KEY);
812 if (!bm) return; 812 if (!bm) return;