Commit f2a4df4e authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/widgets/gimpaction.c app/widgets/gimpcoloreditor.c

2005-11-02  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpaction.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpmenudock.c
	* app/widgets/gimppluginaction.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimpwidgets-utils.c
	* libgimpwidgets/gimpcellrenderercolor.c: use gtk_widget_get_settings()
	instead of gtk_settings_get_for_screen(gtk_widget_get_screen())
parent 82282ea8
2005-11-02 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpaction.c
* app/widgets/gimpcoloreditor.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpmenudock.c
* app/widgets/gimppluginaction.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpwidgets-utils.c
* libgimpwidgets/gimpcellrenderercolor.c: use gtk_widget_get_settings()
instead of gtk_settings_get_for_screen(gtk_widget_get_screen())
2005-11-02 Michael Natterer <mitch@gimp.org> 2005-11-02 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpclipboard.c (gimp_clipboard_set_text): added * app/widgets/gimpclipboard.c (gimp_clipboard_set_text): added
......
...@@ -295,8 +295,7 @@ gimp_action_set_proxy (GimpAction *action, ...@@ -295,8 +295,7 @@ gimp_action_set_proxy (GimpAction *action,
if (! area) if (! area)
{ {
GdkScreen *screen = gtk_widget_get_screen (proxy); GtkSettings *settings = gtk_widget_get_settings (proxy);
GtkSettings *settings = gtk_settings_get_for_screen (screen);
gint width, height; gint width, height;
area = gimp_color_area_new (action->color, area = gimp_color_area_new (action->color,
...@@ -329,8 +328,7 @@ gimp_action_set_proxy (GimpAction *action, ...@@ -329,8 +328,7 @@ gimp_action_set_proxy (GimpAction *action,
if (! view) if (! view)
{ {
GdkScreen *screen = gtk_widget_get_screen (proxy); GtkSettings *settings = gtk_widget_get_settings (proxy);
GtkSettings *settings = gtk_settings_get_for_screen (screen);
GtkIconSize size; GtkIconSize size;
gint width, height; gint width, height;
gint border_width; gint border_width;
......
...@@ -339,8 +339,7 @@ gimp_color_editor_get_preview (GimpDocked *docked, ...@@ -339,8 +339,7 @@ gimp_color_editor_get_preview (GimpDocked *docked,
GimpContext *context, GimpContext *context,
GtkIconSize size) GtkIconSize size)
{ {
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (docked)); GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (docked));
GtkSettings *settings = gtk_settings_get_for_screen (screen);
GtkWidget *preview; GtkWidget *preview;
gint width; gint width;
gint height; gint height;
......
...@@ -204,7 +204,6 @@ gimp_container_box_get_preview (GimpDocked *docked, ...@@ -204,7 +204,6 @@ gimp_container_box_get_preview (GimpDocked *docked,
GimpContainerView *view = GIMP_CONTAINER_VIEW (docked); GimpContainerView *view = GIMP_CONTAINER_VIEW (docked);
GimpContainer *container; GimpContainer *container;
GtkWidget *preview; GtkWidget *preview;
GdkScreen *screen;
gint width; gint width;
gint height; gint height;
gint border_width = 1; gint border_width = 1;
...@@ -214,8 +213,7 @@ gimp_container_box_get_preview (GimpDocked *docked, ...@@ -214,8 +213,7 @@ gimp_container_box_get_preview (GimpDocked *docked,
g_return_val_if_fail (container != NULL, NULL); g_return_val_if_fail (container != NULL, NULL);
screen = gtk_widget_get_screen (GTK_WIDGET (box)); gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (GTK_WIDGET (box)),
gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen),
size, &width, &height); size, &width, &height);
prop_name = gimp_context_type_to_prop_name (container->children_type); prop_name = gimp_context_type_to_prop_name (container->children_type);
......
...@@ -305,7 +305,7 @@ gimp_controller_list_init (GimpControllerList *list) ...@@ -305,7 +305,7 @@ gimp_controller_list_init (GimpControllerList *list)
g_object_add_weak_pointer (G_OBJECT (list->remove_button), g_object_add_weak_pointer (G_OBJECT (list->remove_button),
(gpointer) &list->remove_button); (gpointer) &list->remove_button);
gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (list))), gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (GTK_WIDGET (list)),
icon_size, &icon_width, &icon_height); icon_size, &icon_width, &icon_height);
list->dest = gimp_container_tree_view_new (NULL, NULL, icon_height, 0); list->dest = gimp_container_tree_view_new (NULL, NULL, icon_height, 0);
......
...@@ -251,7 +251,7 @@ gimp_menu_dock_style_set (GtkWidget *widget, ...@@ -251,7 +251,7 @@ gimp_menu_dock_style_set (GtkWidget *widget,
GimpMenuDock *menu_dock; GimpMenuDock *menu_dock;
gint minimal_width; gint minimal_width;
GtkIconSize menu_preview_size; GtkIconSize menu_preview_size;
GdkScreen *screen; GtkSettings *settings;
gint menu_preview_width = 18; gint menu_preview_width = 18;
gint menu_preview_height = 18; gint menu_preview_height = 18;
gint focus_line_width; gint focus_line_width;
...@@ -268,8 +268,8 @@ gimp_menu_dock_style_set (GtkWidget *widget, ...@@ -268,8 +268,8 @@ gimp_menu_dock_style_set (GtkWidget *widget,
"menu-preview-size", &menu_preview_size, "menu-preview-size", &menu_preview_size,
NULL); NULL);
screen = gtk_widget_get_screen (menu_dock->image_combo); settings = gtk_widget_get_settings (menu_dock->image_combo);
gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen), gtk_icon_size_lookup_for_settings (settings,
menu_preview_size, menu_preview_size,
&menu_preview_width, &menu_preview_width,
&menu_preview_height); &menu_preview_height);
...@@ -405,7 +405,7 @@ gimp_menu_dock_new (GimpDialogFactory *dialog_factory, ...@@ -405,7 +405,7 @@ gimp_menu_dock_new (GimpDialogFactory *dialog_factory,
{ {
GimpMenuDock *menu_dock; GimpMenuDock *menu_dock;
GimpContext *context; GimpContext *context;
GdkScreen *screen; GtkSettings *settings;
gint menu_preview_width; gint menu_preview_width;
gint menu_preview_height; gint menu_preview_height;
...@@ -458,8 +458,8 @@ gimp_menu_dock_new (GimpDialogFactory *dialog_factory, ...@@ -458,8 +458,8 @@ gimp_menu_dock_new (GimpDialogFactory *dialog_factory,
menu_dock, menu_dock,
0); 0);
screen = gtk_widget_get_screen (GTK_WIDGET (menu_dock)); settings = gtk_widget_get_settings (GTK_WIDGET (menu_dock));
gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen), gtk_icon_size_lookup_for_settings (settings,
DEFAULT_MENU_PREVIEW_SIZE, DEFAULT_MENU_PREVIEW_SIZE,
&menu_preview_width, &menu_preview_width,
&menu_preview_height); &menu_preview_height);
......
...@@ -192,8 +192,7 @@ gimp_plug_in_action_connect_proxy (GtkAction *action, ...@@ -192,8 +192,7 @@ gimp_plug_in_action_connect_proxy (GtkAction *action,
if (pixbuf) if (pixbuf)
{ {
GdkScreen *screen = gtk_widget_get_screen (proxy); GtkSettings *settings = gtk_widget_get_settings (proxy);
GtkSettings *settings = gtk_settings_get_for_screen (screen);
gint width; gint width;
gint height; gint height;
GtkWidget *image; GtkWidget *image;
......
...@@ -248,14 +248,12 @@ gimp_tool_options_editor_get_preview (GimpDocked *docked, ...@@ -248,14 +248,12 @@ gimp_tool_options_editor_get_preview (GimpDocked *docked,
GimpContext *context, GimpContext *context,
GtkIconSize size) GtkIconSize size)
{ {
GdkScreen *screen; GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (docked));
GtkWidget *view; GtkWidget *view;
gint width; gint width;
gint height; gint height;
screen = gtk_widget_get_screen (GTK_WIDGET (docked)); gtk_icon_size_lookup_for_settings (settings, size, &width, &height);
gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen),
size, &width, &height);
view = gimp_prop_preview_new (G_OBJECT (context), "tool", height); view = gimp_prop_preview_new (G_OBJECT (context), "tool", height);
GIMP_VIEW (view)->renderer->size = -1; GIMP_VIEW (view)->renderer->size = -1;
......
...@@ -330,7 +330,6 @@ gimp_get_icon_size (GtkWidget *widget, ...@@ -330,7 +330,6 @@ gimp_get_icon_size (GtkWidget *widget,
gint max_width; gint max_width;
gint max_height; gint max_height;
GtkIconSize icon_size = GTK_ICON_SIZE_MENU; GtkIconSize icon_size = GTK_ICON_SIZE_MENU;
GdkScreen *screen;
GtkSettings *settings; GtkSettings *settings;
g_return_val_if_fail (GTK_IS_WIDGET (widget), icon_size); g_return_val_if_fail (GTK_IS_WIDGET (widget), icon_size);
...@@ -343,8 +342,7 @@ gimp_get_icon_size (GtkWidget *widget, ...@@ -343,8 +342,7 @@ gimp_get_icon_size (GtkWidget *widget,
if (! icon_set) if (! icon_set)
return GTK_ICON_SIZE_INVALID; return GTK_ICON_SIZE_INVALID;
screen = gtk_widget_get_screen (widget); settings = gtk_widget_get_settings (widget);
settings = gtk_settings_get_for_screen (screen);
if (! gtk_icon_size_lookup_for_settings (settings, max_size, if (! gtk_icon_size_lookup_for_settings (settings, max_size,
&max_width, &max_height)) &max_width, &max_height))
......
...@@ -204,13 +204,10 @@ gimp_cell_renderer_color_get_size (GtkCellRenderer *cell, ...@@ -204,13 +204,10 @@ gimp_cell_renderer_color_get_size (GtkCellRenderer *cell,
gint *height) gint *height)
{ {
GimpCellRendererColor *color = GIMP_CELL_RENDERER_COLOR (cell); GimpCellRendererColor *color = GIMP_CELL_RENDERER_COLOR (cell);
GtkSettings *settings;
gint calc_width; gint calc_width;
gint calc_height; gint calc_height;
settings = gtk_settings_get_for_screen (gtk_widget_get_screen (widget)); gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (widget),
gtk_icon_size_lookup_for_settings (settings,
color->size, &calc_width, &calc_height); color->size, &calc_width, &calc_height);
if (cell_area && calc_width > 0 && calc_height > 0) if (cell_area && calc_width > 0 && calc_height > 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment