summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorJoaquín Ignacio Aramendía <[email protected]>2014-06-25 19:06:17 -0300
committerJoaquín Ignacio Aramendía <[email protected]>2014-06-26 20:03:32 -0300
commita65a66d49bd0d6ec6c94b8e3ecd551cb570cec95 (patch)
treeb451afa6025e587f0ee287601427e572712e3428 /src/tools
parent32050fd47713d9254e05344a6afd87202fa45d11 (diff)
downloadmarco-a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.tar.bz2
marco-a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.tar.xz
Remove all trailing whitespaces in the code tree
Just run: $ find -name '*.c' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i $ find -name '*.h' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/marco-grayscale.c26
-rw-r--r--src/tools/marco-mag.c44
-rw-r--r--src/tools/marco-message.c6
-rw-r--r--src/tools/marco-window-demo.c180
4 files changed, 128 insertions, 128 deletions
diff --git a/src/tools/marco-grayscale.c b/src/tools/marco-grayscale.c
index 8da539b5..7eb3e2b7 100644
--- a/src/tools/marco-grayscale.c
+++ b/src/tools/marco-grayscale.c
@@ -1,8 +1,8 @@
/* Hack for grayscaling an image */
-/*
+/*
* Copyright (C) 2002 Red Hat Inc.
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -12,7 +12,7 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
@@ -36,15 +36,15 @@ grayscale_pixbuf (GdkPixbuf *pixbuf)
int row;
int n_rows;
int width;
-
+
gray = gdk_pixbuf_copy (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (gray);
pixstride = gdk_pixbuf_get_has_alpha (gray) ? 4 : 3;
-
+
pixels = gdk_pixbuf_get_pixels (gray);
n_rows = gdk_pixbuf_get_height (gray);
width = gdk_pixbuf_get_width (gray);
-
+
row = 0;
while (row < n_rows)
{
@@ -58,13 +58,13 @@ grayscale_pixbuf (GdkPixbuf *pixbuf)
p[0] = (guchar) v;
p[1] = (guchar) v;
p[2] = (guchar) v;
-
+
p += pixstride;
}
-
+
++row;
}
-
+
return gray;
}
@@ -74,7 +74,7 @@ main (int argc, char **argv)
GdkPixbuf *pixbuf;
GdkPixbuf *gray;
GError *err;
-
+
if (argc != 2)
{
g_printerr ("specify a single image on the command line\n");
@@ -82,7 +82,7 @@ main (int argc, char **argv)
}
g_type_init ();
-
+
err = NULL;
pixbuf = gdk_pixbuf_new_from_file (argv[1], &err);
if (err != NULL)
@@ -93,7 +93,7 @@ main (int argc, char **argv)
}
gray = grayscale_pixbuf (pixbuf);
-
+
err = NULL;
gdk_pixbuf_save (gray, "grayscale.png", "png", &err, NULL);
if (err != NULL)
@@ -104,6 +104,6 @@ main (int argc, char **argv)
}
g_print ("wrote grayscale.png\n");
-
+
return 0;
}
diff --git a/src/tools/marco-mag.c b/src/tools/marco-mag.c
index 5d6dff35..0e90d95e 100644
--- a/src/tools/marco-mag.c
+++ b/src/tools/marco-mag.c
@@ -1,8 +1,8 @@
/* Hack for use instead of xmag */
-/*
+/*
* Copyright (C) 2002 Red Hat Inc.
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -12,7 +12,7 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
@@ -55,10 +55,10 @@ get_pixbuf (void)
g_print ("Size %d x %d\n",
last_grab_width, last_grab_height);
#endif
-
+
#if GTK_CHECK_VERSION(3, 0, 0)
- screenshot = gdk_pixbuf_get_from_window(gdk_get_default_root_window(), last_grab_x, last_grab_y, last_grab_width, last_grab_height);
+ screenshot = gdk_pixbuf_get_from_window(gdk_get_default_root_window(), last_grab_x, last_grab_y, last_grab_width, last_grab_height);
#else
screenshot = gdk_pixbuf_get_from_drawable (NULL, gdk_get_default_root_window (),
NULL,
@@ -89,14 +89,14 @@ regrab_idle (GtkWidget *image)
GtkAllocation allocation;
gtk_widget_get_allocation (image, &allocation);
-
+
if (allocation.width != last_grab_allocation.width ||
allocation.height != last_grab_allocation.height)
{
last_grab_width = rint (allocation.width / width_factor);
last_grab_height = rint (allocation.height / height_factor);
last_grab_allocation = allocation;
-
+
magnified = get_pixbuf ();
gtk_image_set_from_pixbuf (GTK_IMAGE (image), magnified);
@@ -105,7 +105,7 @@ regrab_idle (GtkWidget *image)
}
regrab_idle_id = 0;
-
+
return FALSE;
}
@@ -125,7 +125,7 @@ grab_area_at_mouse (GtkWidget *invisible,
GdkPixbuf *magnified;
int width, height;
GtkWidget *widget;
-
+
width = last_grab_width;
height = last_grab_height;
@@ -133,9 +133,9 @@ grab_area_at_mouse (GtkWidget *invisible,
last_grab_y = y_root;
last_grab_width = width;
last_grab_height = height;
-
+
magnified = get_pixbuf ();
-
+
display_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (display_window),
last_grab_width, last_grab_height);
@@ -151,7 +151,7 @@ grab_area_at_mouse (GtkWidget *invisible,
G_CALLBACK (gtk_main_quit), NULL);
g_signal_connect_after (G_OBJECT (widget), "size_allocate", G_CALLBACK (image_resized), NULL);
-
+
gtk_widget_show_all (display_window);
}
@@ -168,7 +168,7 @@ mouse_motion (GtkWidget *invisible,
GdkEventMotion *event,
gpointer data)
{
-
+
}
static gboolean
@@ -182,7 +182,7 @@ mouse_release (GtkWidget *invisible,
grab_area_at_mouse (invisible, event->x_root, event->y_root);
shutdown_grab ();
-
+
g_signal_handlers_disconnect_by_func (invisible, mouse_motion, NULL);
g_signal_handlers_disconnect_by_func (invisible, mouse_release, NULL);
@@ -199,14 +199,14 @@ static gboolean
key_press (GtkWidget *invisible,
GdkEventKey *event,
gpointer data)
-{
+{
if (event->keyval == GDK_Escape)
{
shutdown_grab ();
g_signal_handlers_disconnect_by_func (invisible, mouse_press, NULL);
g_signal_handlers_disconnect_by_func (invisible, key_press, NULL);
-
+
return TRUE;
}
@@ -217,7 +217,7 @@ static gboolean
mouse_press (GtkWidget *invisible,
GdkEventButton *event,
gpointer data)
-{
+{
if (event->type == GDK_BUTTON_PRESS &&
event->button == 1)
{
@@ -242,7 +242,7 @@ begin_area_grab (void)
gtk_widget_add_events (grab_widget,
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK);
-
+
gtk_widget_show (grab_widget);
}
@@ -253,7 +253,7 @@ begin_area_grab (void)
g_warning ("Failed to grab keyboard to do eyedropper");
return;
}
-
+
if (gdk_pointer_grab (gtk_widget_get_window (grab_widget),
FALSE,
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
@@ -267,7 +267,7 @@ begin_area_grab (void)
}
gtk_grab_add (grab_widget);
-
+
g_signal_connect (grab_widget, "button_press_event",
G_CALLBACK (mouse_press), NULL);
g_signal_connect (grab_widget, "key_press_event",
@@ -280,8 +280,8 @@ main (int argc, char **argv)
gtk_init (&argc, &argv);
begin_area_grab ();
-
+
gtk_main ();
-
+
return 0;
}
diff --git a/src/tools/marco-message.c b/src/tools/marco-message.c
index 0682457d..723927ac 100644
--- a/src/tools/marco-message.c
+++ b/src/tools/marco-message.c
@@ -156,7 +156,7 @@ int
main (int argc, char **argv)
{
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-
+
gtk_init (&argc, &argv);
if (argc < 2)
@@ -175,13 +175,13 @@ main (int argc, char **argv)
#ifndef WITH_VERBOSE_MODE
g_printerr (_("Marco was compiled without support for verbose mode\n"));
return 1;
-#else
+#else
send_toggle_verbose ();
#endif
}
else
usage ();
-
+
return 0;
}
diff --git a/src/tools/marco-window-demo.c b/src/tools/marco-window-demo.c
index 5a7afa6f..7820b712 100644
--- a/src/tools/marco-window-demo.c
+++ b/src/tools/marco-window-demo.c
@@ -1,8 +1,8 @@
/* Marco window types/properties demo app */
-/*
+/*
* Copyright (C) 2002 Havoc Pennington
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -12,7 +12,7 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
@@ -40,7 +40,7 @@ set_gdk_window_struts (GdkWindow *window,
int bottom)
{
long vals[12];
-
+
vals[0] = left;
vals[1] = right;
vals[2] = top;
@@ -77,7 +77,7 @@ on_realize_set_struts (GtkWindow *window,
right = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (window), "meta-strut-right"));
top = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (window), "meta-strut-top"));
bottom = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (window), "meta-strut-bottom"));
-
+
set_gdk_window_struts (gtk_widget_get_window (GTK_WIDGET (window)),
left, right, top, bottom);
}
@@ -97,11 +97,11 @@ set_gtk_window_struts (GtkWidget *window,
GINT_TO_POINTER (top));
g_object_set_data (G_OBJECT (window), "meta-strut-bottom",
GINT_TO_POINTER (bottom));
-
+
g_signal_handlers_disconnect_by_func (G_OBJECT (window),
on_realize_set_struts,
NULL);
-
+
g_signal_connect_after (G_OBJECT (window),
"realize",
G_CALLBACK (on_realize_set_struts),
@@ -117,15 +117,15 @@ set_gdk_window_type (GdkWindow *window,
const char *type)
{
Atom atoms[2] = { None, None };
-
+
atoms[0] = XInternAtom (GDK_WINDOW_XDISPLAY (window),
type, False);
-
+
XChangeProperty (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XWINDOW (window),
XInternAtom (GDK_WINDOW_XDISPLAY (window), "_NET_WM_WINDOW_TYPE", False),
XA_ATOM, 32, PropModeReplace,
- (guchar *)atoms,
+ (guchar *)atoms,
1);
}
@@ -140,7 +140,7 @@ on_realize_set_type (GtkWindow *window,
type = g_object_get_data (G_OBJECT (window), "meta-window-type");
g_return_if_fail (type != NULL);
-
+
set_gdk_window_type (gtk_widget_get_window (GTK_WIDGET (window)),
type);
}
@@ -154,7 +154,7 @@ set_gtk_window_type (GtkWindow *window,
g_signal_handlers_disconnect_by_func (G_OBJECT (window),
on_realize_set_type,
NULL);
-
+
g_signal_connect_after (G_OBJECT (window),
"realize",
G_CALLBACK (on_realize_set_type),
@@ -176,7 +176,7 @@ on_realize_set_border_only (GtkWindow *window,
gpointer data)
{
g_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (window)));
-
+
set_gdk_window_border_only (gtk_widget_get_window (GTK_WIDGET (window)));
}
@@ -186,7 +186,7 @@ set_gtk_window_border_only (GtkWindow *window)
g_signal_handlers_disconnect_by_func (G_OBJECT (window),
on_realize_set_border_only,
NULL);
-
+
g_signal_connect_after (G_OBJECT (window),
"realize",
G_CALLBACK (on_realize_set_border_only),
@@ -202,7 +202,7 @@ main (int argc, char **argv)
GList *list;
GdkPixbuf *pixbuf;
GError *err;
-
+
gtk_init (&argc, &argv);
err = NULL;
@@ -211,7 +211,7 @@ main (int argc, char **argv)
if (pixbuf)
{
list = g_list_prepend (NULL, pixbuf);
-
+
gtk_window_set_default_icon_list (list);
g_list_free (list);
g_object_unref (G_OBJECT (pixbuf));
@@ -221,11 +221,11 @@ main (int argc, char **argv)
g_printerr ("Could not load icon: %s\n", err->message);
g_error_free (err);
}
-
+
do_appwindow ();
gtk_main ();
-
+
return 0;
}
@@ -240,7 +240,7 @@ make_dialog (GtkWidget *parent,
{
GtkWidget *dialog;
char *str;
-
+
dialog = gtk_message_dialog_new (parent ? GTK_WINDOW (parent) : NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
@@ -252,11 +252,11 @@ make_dialog (GtkWidget *parent,
str = g_strdup_printf ("%d dialog", depth);
gtk_window_set_title (GTK_WINDOW (dialog), str);
g_free (str);
-
+
gtk_dialog_add_button (GTK_DIALOG (dialog),
"Open child dialog",
GTK_RESPONSE_ACCEPT);
-
+
/* Close dialog on user response */
g_signal_connect (G_OBJECT (dialog),
"response",
@@ -265,7 +265,7 @@ make_dialog (GtkWidget *parent,
g_object_set_data (G_OBJECT (dialog), "depth",
GINT_TO_POINTER (depth));
-
+
gtk_widget_show (dialog);
}
@@ -302,7 +302,7 @@ modal_dialog_cb (gpointer callback_data,
GtkWidget *widget)
{
GtkWidget *dialog;
-
+
dialog = gtk_message_dialog_new (GTK_WINDOW (callback_data),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
@@ -310,7 +310,7 @@ modal_dialog_cb (gpointer callback_data,
"Here is a MODAL dialog");
set_gtk_window_type (GTK_WINDOW (dialog), "_NET_WM_WINDOW_TYPE_MODAL_DIALOG");
-
+
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -332,13 +332,13 @@ utility_cb (gpointer callback_data,
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *button;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
set_gtk_window_type (GTK_WINDOW (window), "_NET_WM_WINDOW_TYPE_UTILITY");
gtk_window_set_title (GTK_WINDOW (window), "Utility");
-
+
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
-
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -354,7 +354,7 @@ utility_cb (gpointer callback_data,
button = gtk_button_new_with_mnemonic ("_D button");
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-
+
gtk_widget_show_all (window);
}
@@ -366,20 +366,20 @@ toolbar_cb (gpointer callback_data,
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *label;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
set_gtk_window_type (GTK_WINDOW (window), "_NET_WM_WINDOW_TYPE_TOOLBAR");
gtk_window_set_title (GTK_WINDOW (window), "Toolbar");
-
+
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
-
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new ("FIXME this needs a resize grip, etc.");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-
+
gtk_widget_show_all (window);
}
@@ -391,20 +391,20 @@ menu_cb (gpointer callback_data,
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *label;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
set_gtk_window_type (GTK_WINDOW (window), "_NET_WM_WINDOW_TYPE_MENU");
gtk_window_set_title (GTK_WINDOW (window), "Menu");
-
+
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
-
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new ("FIXME this isn't a menu.");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-
+
gtk_widget_show_all (window);
}
@@ -416,17 +416,17 @@ override_redirect_cb (gpointer callback_data,
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *label;
-
+
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_title (GTK_WINDOW (window), "Override Redirect");
-
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new ("This is an override\nredirect window\nand should not be managed");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-
+
gtk_widget_show_all (window);
}
@@ -438,20 +438,20 @@ border_only_cb (gpointer callback_data,
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *label;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
set_gtk_window_border_only (GTK_WINDOW (window));
gtk_window_set_title (GTK_WINDOW (window), "Border only");
-
+
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
-
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new ("This window is supposed to have a border but no titlebar.");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-
+
gtk_widget_show_all (window);
}
@@ -464,17 +464,17 @@ changing_icon_cb (gpointer callback_data,
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *label;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Changing Icon");
-
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new ("This window has an icon that changes over time");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-
+
gtk_widget_show_all (window);
}
#endif
@@ -504,7 +504,7 @@ focus_out_event_cb (GtkWidget *window,
widget = GTK_WIDGET (data);
gtk_label_set_text (GTK_LABEL (widget), "Not focused");
-
+
return TRUE;
}
@@ -512,7 +512,7 @@ static GtkWidget*
focus_label (GtkWidget *window)
{
GtkWidget *label;
-
+
label = gtk_label_new ("Not focused");
g_signal_connect (G_OBJECT (window), "focus_in_event",
@@ -520,7 +520,7 @@ focus_label (GtkWidget *window)
g_signal_connect (G_OBJECT (window), "focus_out_event",
G_CALLBACK (focus_out_event_cb), label);
-
+
return label;
}
@@ -532,20 +532,20 @@ splashscreen_cb (gpointer callback_data,
GtkWidget *window;
GtkWidget *image;
GtkWidget *vbox;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
set_gtk_window_type (GTK_WINDOW (window), "_NET_WM_WINDOW_TYPE_SPLASHSCREEN");
gtk_window_set_title (GTK_WINDOW (window), "Splashscreen");
-
+
vbox = gtk_vbox_new (FALSE, 0);
-
+
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (vbox), image, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), focus_label (window), FALSE, FALSE, 0);
-
+ gtk_box_pack_start (GTK_BOX (vbox), focus_label (window), FALSE, FALSE, 0);
+
gtk_container_add (GTK_CONTAINER (window), vbox);
-
+
gtk_widget_show_all (window);
}
@@ -572,7 +572,7 @@ make_dock (int type)
switch (type)
{
case DOCK_LEFT:
- case DOCK_RIGHT:
+ case DOCK_RIGHT:
box = gtk_vbox_new (FALSE, 0);
break;
case DOCK_TOP:
@@ -585,18 +585,18 @@ make_dock (int type)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
set_gtk_window_type (GTK_WINDOW (window), "_NET_WM_WINDOW_TYPE_DOCK");
-
+
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
- gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
-
- gtk_box_pack_start (GTK_BOX (box), focus_label (window), FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
+
+ gtk_box_pack_start (GTK_BOX (box), focus_label (window), FALSE, FALSE, 0);
button = gtk_button_new_with_label ("Close");
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_widget_destroy), window);
-
+
gtk_container_add (GTK_CONTAINER (window), box);
#define DOCK_SIZE 48
@@ -608,7 +608,7 @@ make_dock (int type)
set_gtk_window_struts (window, DOCK_SIZE, 0, 0, 0);
gtk_window_set_title (GTK_WINDOW (window), "LeftDock");
break;
- case DOCK_RIGHT:
+ case DOCK_RIGHT:
gtk_widget_set_size_request (window, DOCK_SIZE, 400);
gtk_window_move (GTK_WINDOW (window), gdk_screen_width () - DOCK_SIZE, 200);
set_gtk_window_struts (window, 0, DOCK_SIZE, 0, 0);
@@ -629,7 +629,7 @@ make_dock (int type)
case DOCK_ALL:
break;
}
-
+
gtk_widget_show_all (window);
}
@@ -678,24 +678,24 @@ desktop_cb (gpointer callback_data,
GtkWidget *window;
GtkWidget *label;
GdkColor desktop_color;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
set_gtk_window_type (GTK_WINDOW (window), "_NET_WM_WINDOW_TYPE_DESKTOP");
gtk_window_set_title (GTK_WINDOW (window), "Desktop");
gtk_widget_set_size_request (window,
gdk_screen_width (), gdk_screen_height ());
gtk_window_move (GTK_WINDOW (window), 0, 0);
-
+
desktop_color.red = 0x5144;
desktop_color.green = 0x75D6;
desktop_color.blue = 0xA699;
gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &desktop_color);
-
+
label = focus_label (window);
-
+
gtk_container_add (GTK_CONTAINER (window), label);
-
+
gtk_widget_show_all (window);
}
@@ -724,7 +724,7 @@ static gchar ui_definition[] =
</menubar>\
</ui>";
-static GtkActionEntry entries[] =
+static GtkActionEntry entries[] =
{
/*
struct GtkActionEntry {
@@ -811,7 +811,7 @@ toggle_aspect_ratio (GtkWidget *button,
GTK_WIDGET (data),
&geom,
GDK_HINT_ASPECT);
-
+
}
static void
@@ -830,7 +830,7 @@ clicked_toolbar_cb (GtkWidget *button,
gpointer data)
{
GtkWidget *dialog;
-
+
dialog = gtk_message_dialog_new (GTK_WINDOW (data),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
@@ -842,7 +842,7 @@ clicked_toolbar_cb (GtkWidget *button,
"response",
G_CALLBACK (gtk_widget_destroy),
NULL);
-
+
gtk_widget_show (dialog);
}
@@ -854,7 +854,7 @@ update_statusbar (GtkTextBuffer *buffer,
gint row, col;
gint count;
GtkTextIter iter;
-
+
gtk_statusbar_pop (statusbar, 0); /* clear any previous message, underflow is allowed */
count = gtk_text_buffer_get_char_count (buffer);
@@ -909,11 +909,11 @@ do_appwindow (void)
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
#else
- GtkAccelGroup *accel_group;
+ GtkAccelGroup *accel_group;
GtkItemFactory *item_factory;
#endif
-
+
/* Create the toplevel window
*/
@@ -923,12 +923,12 @@ do_appwindow (void)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Application Window");
-
+
g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (destroy_cb), NULL);
-
+
table = gtk_table_new (1, 4, FALSE);
-
+
gtk_container_add (GTK_CONTAINER (window), table);
#if GTK_CHECK_VERSION(3, 0, 0)
@@ -950,14 +950,14 @@ do_appwindow (void)
gtk_window_add_accel_group (GTK_WINDOW (window), gtk_ui_manager_get_accel_group (ui_manager));
#else
-
+
/* Create the menubar
*/
-
+
accel_group = gtk_accel_group_new ();
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
g_object_unref (accel_group);
-
+
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group);
/* Set up item factory to go away with the window */
@@ -994,7 +994,7 @@ do_appwindow (void)
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
GTK_SHADOW_IN);
-
+
gtk_table_attach (GTK_TABLE (table),
sw,
/* X direction */ /* Y direction */
@@ -1004,11 +1004,11 @@ do_appwindow (void)
gtk_window_set_default_size (GTK_WINDOW (window),
200, 200);
-
+
contents = gtk_text_view_new ();
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (contents),
PANGO_WRAP_WORD);
-
+
gtk_container_add (GTK_CONTAINER (sw),
contents);
@@ -1026,8 +1026,8 @@ do_appwindow (void)
gtk_toolbar_insert(GTK_TOOLBAR(toolbar),
newButton,
-1); /*-1 means append to end of toolbar*/
-
-
+
+
GtkToolItem *lockButton = gtk_tool_button_new_from_stock(GTK_STOCK_OPEN);
gtk_tool_item_set_tooltip_text(lockButton,
"This is a demo button that locks up the demo");
@@ -1038,7 +1038,7 @@ do_appwindow (void)
gtk_toolbar_insert(GTK_TOOLBAR(toolbar),
lockButton,
-1); /*-1 means append to end of toolbar*/
-
+
GtkToolItem *decoButton = gtk_tool_button_new_from_stock(GTK_STOCK_OPEN);
gtk_tool_item_set_tooltip_text(decoButton,
@@ -1076,7 +1076,7 @@ do_appwindow (void)
handlebox = gtk_handle_box_new ();
gtk_container_add (GTK_CONTAINER (handlebox), toolbar);
-
+
gtk_table_attach (GTK_TABLE (table),
handlebox,
/* X direction */ /* Y direction */
@@ -1103,7 +1103,7 @@ do_appwindow (void)
"Be sure to tear off the menu and toolbar, those are also "
"a special kind of window.",
-1);
-
+
g_signal_connect_object (buffer,
"changed",
G_CALLBACK (update_statusbar),
@@ -1115,7 +1115,7 @@ do_appwindow (void)
G_CALLBACK (mark_set_callback),
statusbar,
0);
-
+
update_statusbar (buffer, GTK_STATUSBAR (statusbar));
gtk_widget_show_all (window);