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>
* app/widgets/gimpclipboard.c (gimp_clipboard_set_text): added
......
......@@ -295,8 +295,7 @@ gimp_action_set_proxy (GimpAction *action,
if (! area)
{
GdkScreen *screen = gtk_widget_get_screen (proxy);
GtkSettings *settings = gtk_settings_get_for_screen (screen);
GtkSettings *settings = gtk_widget_get_settings (proxy);
gint width, height;
area = gimp_color_area_new (action->color,
......@@ -329,8 +328,7 @@ gimp_action_set_proxy (GimpAction *action,
if (! view)
{
GdkScreen *screen = gtk_widget_get_screen (proxy);
GtkSettings *settings = gtk_settings_get_for_screen (screen);
GtkSettings *settings = gtk_widget_get_settings (proxy);
GtkIconSize size;
gint width, height;
gint border_width;
......
......@@ -339,8 +339,7 @@ gimp_color_editor_get_preview (GimpDocked *docked,
GimpContext *context,
GtkIconSize size)
{
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (docked));
GtkSettings *settings = gtk_settings_get_for_screen (screen);
GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (docked));
GtkWidget *preview;
gint width;
gint height;
......
......@@ -204,7 +204,6 @@ gimp_container_box_get_preview (GimpDocked *docked,
GimpContainerView *view = GIMP_CONTAINER_VIEW (docked);
GimpContainer *container;
GtkWidget *preview;
GdkScreen *screen;
gint width;
gint height;
gint border_width = 1;
......@@ -214,8 +213,7 @@ gimp_container_box_get_preview (GimpDocked *docked,
g_return_val_if_fail (container != NULL, NULL);
screen = gtk_widget_get_screen (GTK_WIDGET (box));
gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen),
gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (GTK_WIDGET (box)),
size, &width, &height);
prop_name = gimp_context_type_to_prop_name (container->children_type);
......
......@@ -305,7 +305,7 @@ gimp_controller_list_init (GimpControllerList *list)
g_object_add_weak_pointer (G_OBJECT (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);
list->dest = gimp_container_tree_view_new (NULL, NULL, icon_height, 0);
......
......@@ -251,7 +251,7 @@ gimp_menu_dock_style_set (GtkWidget *widget,
GimpMenuDock *menu_dock;
gint minimal_width;
GtkIconSize menu_preview_size;
GdkScreen *screen;
GtkSettings *settings;
gint menu_preview_width = 18;
gint menu_preview_height = 18;
gint focus_line_width;
......@@ -268,8 +268,8 @@ gimp_menu_dock_style_set (GtkWidget *widget,
"menu-preview-size", &menu_preview_size,
NULL);
screen = gtk_widget_get_screen (menu_dock->image_combo);
gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen),
settings = gtk_widget_get_settings (menu_dock->image_combo);
gtk_icon_size_lookup_for_settings (settings,
menu_preview_size,
&menu_preview_width,
&menu_preview_height);
......@@ -405,7 +405,7 @@ gimp_menu_dock_new (GimpDialogFactory *dialog_factory,
{
GimpMenuDock *menu_dock;
GimpContext *context;
GdkScreen *screen;
GtkSettings *settings;
gint menu_preview_width;
gint menu_preview_height;
......@@ -458,8 +458,8 @@ gimp_menu_dock_new (GimpDialogFactory *dialog_factory,
menu_dock,
0);
screen = gtk_widget_get_screen (GTK_WIDGET (menu_dock));
gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen),
settings = gtk_widget_get_settings (GTK_WIDGET (menu_dock));
gtk_icon_size_lookup_for_settings (settings,
DEFAULT_MENU_PREVIEW_SIZE,
&menu_preview_width,
&menu_preview_height);
......
......@@ -192,8 +192,7 @@ gimp_plug_in_action_connect_proxy (GtkAction *action,
if (pixbuf)
{
GdkScreen *screen = gtk_widget_get_screen (proxy);
GtkSettings *settings = gtk_settings_get_for_screen (screen);
GtkSettings *settings = gtk_widget_get_settings (proxy);
gint width;
gint height;
GtkWidget *image;
......
......@@ -248,14 +248,12 @@ gimp_tool_options_editor_get_preview (GimpDocked *docked,
GimpContext *context,
GtkIconSize size)
{
GdkScreen *screen;
GtkWidget *view;
gint width;
gint height;
screen = gtk_widget_get_screen (GTK_WIDGET (docked));
gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen),
size, &width, &height);
GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (docked));
GtkWidget *view;
gint width;
gint height;
gtk_icon_size_lookup_for_settings (settings, size, &width, &height);
view = gimp_prop_preview_new (G_OBJECT (context), "tool", height);
GIMP_VIEW (view)->renderer->size = -1;
......
......@@ -330,7 +330,6 @@ gimp_get_icon_size (GtkWidget *widget,
gint max_width;
gint max_height;
GtkIconSize icon_size = GTK_ICON_SIZE_MENU;
GdkScreen *screen;
GtkSettings *settings;
g_return_val_if_fail (GTK_IS_WIDGET (widget), icon_size);
......@@ -343,8 +342,7 @@ gimp_get_icon_size (GtkWidget *widget,
if (! icon_set)
return GTK_ICON_SIZE_INVALID;
screen = gtk_widget_get_screen (widget);
settings = gtk_settings_get_for_screen (screen);
settings = gtk_widget_get_settings (widget);
if (! gtk_icon_size_lookup_for_settings (settings, max_size,
&max_width, &max_height))
......
......@@ -204,13 +204,10 @@ gimp_cell_renderer_color_get_size (GtkCellRenderer *cell,
gint *height)
{
GimpCellRendererColor *color = GIMP_CELL_RENDERER_COLOR (cell);
GtkSettings *settings;
gint calc_width;
gint calc_height;
settings = gtk_settings_get_for_screen (gtk_widget_get_screen (widget));
gtk_icon_size_lookup_for_settings (settings,
gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (widget),
color->size, &calc_width, &calc_height);
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