GdkPixbuf* pixbuf_scaled;
gint icon_width, icon_height;
size_t ret;
+ GtkSettings* settings;
if (request->status == KATZE_NET_MOVED)
return;
return;
}
}
- gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &icon_width, &icon_height);
+
+ if (priv->widget)
+ settings = gtk_widget_get_settings (priv->widget);
+ else
+ settings = gtk_settings_get_for_screen (gdk_screen_get_default ());
+
+ gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU,
+ &icon_width, &icon_height);
pixbuf_scaled = gdk_pixbuf_scale_simple (pixbuf, icon_width, icon_height,
GDK_INTERP_BILINEAR);
g_object_unref (pixbuf);
GdkPixbuf* pixbuf;
gint icon_width, icon_height;
GdkPixbuf* pixbuf_scaled;
+ GtkSettings* settings;
g_return_val_if_fail (KATZE_IS_NET (net), NULL);
g_return_val_if_fail (!widget || GTK_IS_WIDGET (widget), NULL);
else
return NULL;
}
- gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &icon_width, &icon_height);
+
+ if (widget)
+ settings = gtk_widget_get_settings (widget);
+ else
+ settings = gtk_settings_get_for_screen (gdk_screen_get_default ());
+
+ gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU,
+ &icon_width, &icon_height);
pixbuf_scaled = gdk_pixbuf_scale_simple (pixbuf, icon_width, icon_height,
GDK_INTERP_BILINEAR);
g_object_unref (pixbuf);
GObject* object)
{
gboolean toggled;
+ const gchar* property;
+
#ifdef HAVE_HILDON_2_2
if (HILDON_IS_CHECK_BUTTON (button))
toggled = hildon_check_button_get_active (HILDON_CHECK_BUTTON (button));
#else
toggled = gtk_toggle_button_get_active (button);
#endif
- const gchar* property = g_object_get_data (G_OBJECT (button), "property");
+ property = g_object_get_data (G_OBJECT (button), "property");
g_object_set (object, property, toggled, NULL);
}
GtkComboBox* combo;
GList* apps;
const gchar* app_type = &hint[12];
+ GtkSettings* settings;
gint icon_width = 16;
- gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &icon_width, NULL);
+
+ settings = gtk_settings_get_for_screen (gdk_screen_get_default ());
+ gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU,
+ &icon_width, NULL);
model = gtk_list_store_new (4, G_TYPE_APP_INFO, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_INT);
_action_fullscreen_activate (GtkAction* action,
MidoriBrowser* browser)
{
+ GdkWindowState state;
+
if (!GTK_WIDGET (browser)->window)
return;
- GdkWindowState state = gdk_window_get_state (GTK_WIDGET (browser)->window);
+ state = gdk_window_get_state (GTK_WIDGET (browser)->window);
if (state & GDK_WINDOW_STATE_FULLSCREEN)
gtk_window_unfullscreen (GTK_WINDOW (browser));
else
_action_back_activate (GtkAction* action,
MidoriBrowser* browser)
{
+ GtkWidget* view;
+
if (g_object_get_data (G_OBJECT (action), "midori-middle-click"))
{
g_object_set_data (G_OBJECT (action), "midori-middle-click", (void*)0);
return;
}
- GtkWidget* view = midori_browser_get_current_tab (browser);
+ view = midori_browser_get_current_tab (browser);
if (view)
midori_view_go_back (MIDORI_VIEW (view));
}
_action_forward_activate (GtkAction* action,
MidoriBrowser* browser)
{
+ GtkWidget* view;
+
if (g_object_get_data (G_OBJECT (action), "midori-middle-click"))
{
g_object_set_data (G_OBJECT (action), "midori-middle-click", (void*)0);
return;
}
- GtkWidget* view = midori_browser_get_current_tab (browser);
+ view = midori_browser_get_current_tab (browser);
if (view)
midori_view_go_forward (MIDORI_VIEW (view));
}
_action_previous_activate (GtkAction* action,
MidoriBrowser* browser)
{
+ GtkWidget* view;
+
if (g_object_get_data (G_OBJECT (action), "midori-middle-click"))
{
g_object_set_data (G_OBJECT (action), "midori-middle-click", (void*)0);
return;
}
- GtkWidget* view = midori_browser_get_current_tab (browser);
+ view = midori_browser_get_current_tab (browser);
if (view)
{
gchar* uri = g_strdup (midori_view_get_previous_page (MIDORI_VIEW (view)));
_action_next_activate (GtkAction* action,
MidoriBrowser* browser)
{
+ GtkWidget* view;
+
if (g_object_get_data (G_OBJECT (action), "midori-middle-click"))
{
g_object_set_data (G_OBJECT (action), "midori-middle-click", (void*)0);
return;
}
- GtkWidget* view = midori_browser_get_current_tab (browser);
+ view = midori_browser_get_current_tab (browser);
if (view)
{
gchar* uri = g_strdup (midori_view_get_next_page (MIDORI_VIEW (view)));
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), renderer, "text", 0);
combobox = GTK_COMBO_BOX (combo);
- gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &icon_width, NULL);
+ gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (GTK_WIDGET (browser)),
+ GTK_ICON_SIZE_MENU, &icon_width, NULL);
for (i = 0; i < G_N_ELEMENTS (bookmark_clients); i++)
{
gchar* path = g_build_filename (g_get_home_dir (),
gtk_tree_model_get (model, iter, 0, &item, -1);
search_action = g_object_get_data (G_OBJECT (treeview), "search-action");
- gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, NULL);
+ gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (treeview),
+ GTK_ICON_SIZE_MENU, &width, NULL);
g_object_set (renderer, "stock-id",
search_action->default_item == item ? GTK_STOCK_YES : NULL,
"width", width + 4, NULL);