tools/Makefile.am tools/shooter.c some minor cleanups, removed unused
2005-04-20 Sven Neumann <sven@gimp.org> * tools/Makefile.am * tools/shooter.c * tools/widgets.[ch]: some minor cleanups, removed unused includes, made code multihead-safe.
This commit is contained in:

committed by
Sven Neumann

parent
794eaedff6
commit
2147e5029c
@ -1,8 +1,11 @@
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/gimpui.h"
|
||||
|
||||
#include "widgets.h"
|
||||
|
||||
|
||||
@ -13,29 +16,6 @@
|
||||
#define LARGE_WIDTH 240
|
||||
#define LARGE_HEIGHT 240
|
||||
|
||||
static Window
|
||||
find_toplevel_window (Window xid)
|
||||
{
|
||||
Window root, parent, *children;
|
||||
int nchildren;
|
||||
|
||||
do
|
||||
{
|
||||
if (XQueryTree (gdk_display (), xid, &root,
|
||||
&parent, &children, &nchildren) == 0)
|
||||
{
|
||||
g_warning ("Couldn't find window manager window");
|
||||
return None;
|
||||
}
|
||||
|
||||
if (root == parent)
|
||||
return xid;
|
||||
|
||||
xid = parent;
|
||||
}
|
||||
while (TRUE);
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
adjust_size_callback (WidgetInfo *info)
|
||||
@ -254,7 +234,7 @@ create_combo_box_entry (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *align;
|
||||
|
||||
|
||||
gtk_rc_parse_string ("style \"combo-box-entry-style\" {\n"
|
||||
" GtkComboBox::appears-as-list = 1\n"
|
||||
"}\n"
|
||||
@ -272,7 +252,7 @@ create_combo_box (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *align;
|
||||
|
||||
|
||||
gtk_rc_parse_string ("style \"combo-box-style\" {\n"
|
||||
" GtkComboBox::appears-as-list = 0\n"
|
||||
"}\n"
|
||||
@ -516,11 +496,11 @@ create_colorsel (void)
|
||||
color.blue = 0x9595;
|
||||
|
||||
gtk_color_selection_set_previous_color (colorsel, &color);
|
||||
|
||||
|
||||
color.red = 0x7d7d;
|
||||
color.green = 0x9393;
|
||||
color.blue = 0xc3c3;
|
||||
|
||||
|
||||
gtk_color_selection_set_current_color (colorsel, &color);
|
||||
|
||||
info = new_widget_info ("colorsel", widget, ASIS);
|
||||
@ -552,9 +532,9 @@ create_filesel (void)
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
NULL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (widget), 505, 305);
|
||||
|
||||
|
||||
info = new_widget_info ("filechooser", widget, ASIS);
|
||||
info->include_decorations = TRUE;
|
||||
|
||||
@ -634,7 +614,7 @@ create_notebook (void)
|
||||
|
||||
widget = gtk_notebook_new ();
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (widget),
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (widget),
|
||||
gtk_label_new ("Notebook"),
|
||||
NULL);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (widget), gtk_event_box_new (), NULL);
|
||||
@ -672,7 +652,7 @@ create_scrolledwindow (void)
|
||||
scrolledwin = gtk_scrolled_window_new (NULL, NULL);
|
||||
label = gtk_label_new ("Scrolled Window");
|
||||
|
||||
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwin),
|
||||
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwin),
|
||||
label);
|
||||
|
||||
return new_widget_info ("scrolledwindow", scrolledwin, MEDIUM);
|
||||
|
Reference in New Issue
Block a user