if (strchr (data[0], ','))
{
gchar** domains;
- gint max, i;
+ gint i;
domains = g_strsplit (data[0], ",", -1);
- for (max = i = 0; domains[i]; i++)
+ for (i = 0; domains[i]; i++)
{
new_blockcss = g_strdup_printf ("%s;\nsites['%s']+=',%s'",
blockcssprivate, g_strstrip (domains[i]), data[1]);
gpointer callback,
FeedPanel* panel)
{
- const gchar* uri;
GtkWidget* menuitem;
- uri = katze_item_get_uri (item);
-
menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL);
if (label)
gtk_label_set_text_with_mnemonic (GTK_LABEL (gtk_bin_get_child (
GParamSpec* pspec,
GtkToolItem* toolitem)
{
- KatzeArrayAction* array_action;
const gchar* property;
const gchar* title;
const gchar* desc;
if (!G_IS_PARAM_SPEC_STRING (pspec))
return;
- array_action = (KatzeArrayAction*)g_object_get_data (
- G_OBJECT (toolitem), "KatzeArrayAction");
property = g_param_spec_get_name (pspec);
if (!strcmp (property, "name"))
{
GtkScrolledWindow* gtk_scrolled = GTK_SCROLLED_WINDOW (scrolled);
GtkAdjustment* hadjustment;
GtkAdjustment* vadjustment;
- gdouble hpage_size, hupper, hlower, hvalue, new_hvalue;
- gdouble vpage_size, vupper, vlower, vvalue, new_vvalue;
+ gdouble hpage_size, hupper, hvalue, new_hvalue;
+ gdouble vpage_size, vupper, vvalue, new_vvalue;
hadjustment = gtk_scrolled_window_get_hadjustment (gtk_scrolled);
hpage_size = gtk_adjustment_get_page_size (hadjustment);
hupper = gtk_adjustment_get_upper (hadjustment);
- hlower = gtk_adjustment_get_lower (hadjustment);
hvalue = gtk_adjustment_get_value (hadjustment);
new_hvalue = calculate_timeout_scroll_values (hvalue,
hupper - hpage_size,
vadjustment = gtk_scrolled_window_get_vadjustment (gtk_scrolled);
vpage_size = gtk_adjustment_get_page_size (vadjustment);
vupper = gtk_adjustment_get_upper (vadjustment);
- vlower = gtk_adjustment_get_lower (vadjustment);
vvalue = gtk_adjustment_get_value (vadjustment);
new_vvalue = calculate_timeout_scroll_values (vvalue,
vupper - vpage_size,
{
GError* error;
GtkPrintOperation* operation = gtk_print_operation_new ();
- GtkPrintOperationAction action = GTK_PRINT_OPERATION_ACTION_EXPORT;
- GtkPrintOperationResult result;
gtk_print_operation_set_export_filename (operation, filename);
error = NULL;
- result = webkit_web_frame_print_full (web_frame, operation, action, &error);
+ webkit_web_frame_print_full (web_frame, operation,
+ GTK_PRINT_OPERATION_ACTION_EXPORT, &error);
if (error != NULL)
{
string_append_item (GString* string,
KatzeItem* item)
{
- gchar* markup;
gchar* metadata;
g_return_if_fail (KATZE_IS_ITEM (item));
- markup = NULL;
metadata = katze_item_metadata_to_xbel (item);
if (KATZE_IS_ARRAY (item))
{
MidoriBrowser* browser)
{
MidoriView* view = MIDORI_VIEW (widget);
- const gchar* uri;
const gchar* title;
- uri = midori_view_get_display_uri (view);
title = midori_view_get_display_title (view);
if (midori_view_get_load_status (view) == MIDORI_LOAD_COMMITTED)
{
GtkListStore* model;
GtkCellRenderer* renderer;
- guint i, n;
+ guint n;
sqlite3_stmt* statement;
gint result;
const gchar* sqlcmd;
0, _("Toplevel folder"), 1, PANGO_ELLIPSIZE_END, -1);
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_folder), 0);
- i = 0;
n = 1;
sqlcmd = "SELECT title from bookmarks where uri=''";
result = sqlite3_prepare_v2 (db, sqlcmd, -1, &statement, NULL);
MidoriBrowser* browser)
{
KatzeItem* item;
- const gchar* uri;
if (browser->proxy_array && MIDORI_IS_VIEW (widget))
{
item = midori_view_get_proxy_item (MIDORI_VIEW (widget));
- uri = katze_item_get_uri (item);
if (browser->trash && !midori_view_is_blank (MIDORI_VIEW (widget)))
katze_array_add_item (browser->trash, item);
katze_array_remove_item (browser->proxy_array, item);
{
GtkWidget* content_area;
GdkScreen* screen;
- GtkIconTheme* icon_theme;
GtkSizeGroup* sizegroup;
GtkWidget* hbox;
GtkWidget* alignment;
screen = gtk_widget_get_screen (GTK_WIDGET (browser));
if (screen)
{
- icon_theme = gtk_icon_theme_get_for_screen (screen);
gtk_window_set_icon_name (GTK_WINDOW (dialog), GTK_STOCK_CLEAR);
}
sizegroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
midori_browser_set_history (MidoriBrowser* browser,
KatzeArray* history)
{
- time_t now;
- gint64 day;
-
if (browser->history == history)
return;
g_signal_connect (browser->history, "clear",
G_CALLBACK (midori_browser_history_clear_cb), browser);
- now = time (NULL);
- day = sokoke_time_t_to_julian (&now);
-
g_object_set (_action_by_name (browser, "Location"), "history",
browser->history, NULL);
}
KatzeArray* search_engines)
{
GSList* proxies;
- GtkWidget* alignment;
- GtkWidget* entry;
g_return_if_fail (MIDORI_IS_SEARCH_ACTION (search_action));
g_return_if_fail (!search_engines ||
proxies = gtk_action_get_proxies (GTK_ACTION (search_action));
if (!proxies)
return;
-
- do
- if (GTK_IS_TOOL_ITEM (proxies->data))
- {
- alignment = gtk_bin_get_child (GTK_BIN (proxies->data));
- entry = gtk_bin_get_child (GTK_BIN (alignment));
-
- /* FIXME: Unset the current item if it isn't in the list */
- }
- while ((proxies = g_slist_next (proxies)));
}
KatzeItem*
GtkWidget* treeview)
{
KatzeItem* item;
- MidoriSearchAction* search_action;
GdkPixbuf* icon;
const gchar* icon_name;
gtk_tree_model_get (model, iter, 0, &item, -1);
- search_action = g_object_get_data (G_OBJECT (treeview), "search-action");
if ((icon = midori_search_action_get_icon (item, treeview, &icon_name, FALSE)))
{
g_object_set (renderer, "pixbuf", icon, "yalign", 0.25, NULL);
midori_search_action_dialog_default_cb (GtkWidget* widget,
MidoriSearchAction* search_action)
{
- KatzeArray* search_engines;
GtkWidget* treeview;
GtkTreeSelection* selection;
GtkTreeModel* liststore;
GtkTreeIter iter;
KatzeItem* item;
- search_engines = search_action->search_engines;
treeview = search_action->treeview;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
if (gtk_tree_selection_get_selected (selection, &liststore, &iter))
{
KatzeItem* item;
GtkTreeIter parent;
- sqlite3* db;
gchar* parent_name;
- db = g_object_get_data (G_OBJECT (bookmarks->array), "db");
gtk_tree_model_get (model, iter, 0, &item, -1);
if (gtk_tree_model_iter_parent (model, &parent, iter))