gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
check_toolbar = gtk_check_button_new_with_mnemonic (_("Show in the tool_bar"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_toolbar),
- katze_item_get_meta_string (bookmark, "toolbar") != NULL);
+ katze_item_get_meta_integer (bookmark, "toolbar"));
gtk_box_pack_start (GTK_BOX (hbox), check_toolbar, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (content_area), hbox);
gtk_widget_show_all (hbox);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
check_app = gtk_check_button_new_with_mnemonic (_("Run as _web application"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_app),
- katze_item_get_meta_string (bookmark, "app") != NULL);
+ katze_item_get_meta_integer (bookmark, "app"));
gtk_box_pack_start (GTK_BOX (hbox), check_app, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (content_area), hbox);
gtk_widget_show_all (hbox);
gtk_entry_get_text (GTK_ENTRY (entry_desc)));
/* FIXME: Toolbar is not working?? */
katze_item_set_meta_integer (bookmark, "toolbar",
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_toolbar))
- ? 1 : -1);
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_toolbar)));
if (!KATZE_IS_ARRAY (bookmark))
{
katze_item_set_uri (bookmark,
gtk_entry_get_text (GTK_ENTRY (entry_uri)));
katze_item_set_meta_integer (bookmark, "app",
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_app))
- ? 1 : -1);
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_app)));
}
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_toolbar)))
app = sqlite3_column_int64 (statement, 3);
toolbar = sqlite3_column_int64 (statement, 4);
-
- if (app == 0)
- app = -1;
- if (toolbar == 0)
- toolbar = -1;
-
item = katze_item_new ();
katze_item_set_name (item, (gchar*)title);
katze_item_set_meta_integer (item, "toolbar", toolbar);
else
parent = g_strdup ("");
- if (katze_item_get_meta_integer (item, "toolbar") == -1)
- katze_item_set_meta_integer (item, "toolbar", 0);
-
- if (katze_item_get_meta_integer (item, "app") == -1)
- katze_item_set_meta_integer (item, "app", 0);
-
sqlcmd = sqlite3_mprintf (
"INSERT into bookmarks (uri, title, folder, type, toolbar, app) values"
" ('%q', '%q', '%q', %u, %u, %u)",