summaryrefslogtreecommitdiff
path: root/mate-window-picker-applet
diff options
context:
space:
mode:
authorÉtienne Deparis <[email protected]>2019-04-01 19:48:27 +0200
committerraveit65 <[email protected]>2019-05-10 10:18:54 +0200
commit55c91289c3fcd746d824d0928171484cde3c85f0 (patch)
treead11574f681006bc29a95b78e164baba962d9d08 /mate-window-picker-applet
parentee356868df465f2f256304869359a7320b92ed35 (diff)
downloadmate-netbook-55c91289c3fcd746d824d0928171484cde3c85f0.tar.bz2
mate-netbook-55c91289c3fcd746d824d0928171484cde3c85f0.tar.xz
Cleanup whitespaces
Diffstat (limited to 'mate-window-picker-applet')
-rw-r--r--mate-window-picker-applet/applet.c34
-rw-r--r--mate-window-picker-applet/task-list.c21
-rw-r--r--mate-window-picker-applet/task-title.c64
-rw-r--r--mate-window-picker-applet/task-title.h7
4 files changed, 62 insertions, 64 deletions
diff --git a/mate-window-picker-applet/applet.c b/mate-window-picker-applet/applet.c
index e9018aa..37fabeb 100644
--- a/mate-window-picker-applet/applet.c
+++ b/mate-window-picker-applet/applet.c
@@ -2,7 +2,7 @@
* Copyright (C) 2008 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
+ * it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -41,13 +41,13 @@
#define APPLET_SCHEMA "org.mate.panel.applet.mate-window-picker-applet"
#define SHOW_WIN_KEY "show-all-windows"
-typedef struct
+typedef struct
{
GtkWidget *tasks;
GtkWidget *applet;
GtkWidget *title;
GSettings *settings;
-
+
} WinPickerApp;
static WinPickerApp *mainapp;
@@ -119,8 +119,8 @@ cw_applet_finalize (GObject *object)
}
static gboolean
-cw_applet_fill (MatePanelApplet *applet,
- const gchar *iid,
+cw_applet_fill (MatePanelApplet *applet,
+ const gchar *iid,
gpointer data)
{
WnckScreen *screen;
@@ -129,10 +129,10 @@ cw_applet_fill (MatePanelApplet *applet,
gchar *ui_path;
GtkActionGroup *action_group;
GObjectClass *object_class;
-
+
if (strcmp (iid, "MateWindowPicker") != 0)
return FALSE;
-
+
bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
@@ -141,7 +141,7 @@ cw_applet_fill (MatePanelApplet *applet,
mate_panel_applet_set_background_widget (MATE_PANEL_APPLET (applet), GTK_WIDGET (applet));
wnck_set_client_type (WNCK_CLIENT_TYPE_PAGER);
-
+
app = g_slice_new0 (WinPickerApp);
mainapp = app;
screen = wnck_screen_get_default ();
@@ -170,7 +170,7 @@ cw_applet_fill (MatePanelApplet *applet,
gtk_box_pack_start (GTK_BOX (eb), title, TRUE, TRUE, 0);
gtk_widget_show_all (GTK_WIDGET (applet));
-
+
on_show_all_windows_changed (app->settings, SHOW_WIN_KEY, app);
action_group = gtk_action_group_new ("MateWindowPicker Applet Actions");
@@ -185,11 +185,11 @@ cw_applet_fill (MatePanelApplet *applet,
g_free (ui_path);
g_object_unref (action_group);
- mate_panel_applet_set_flags (MATE_PANEL_APPLET (applet),
+ mate_panel_applet_set_flags (MATE_PANEL_APPLET (applet),
MATE_PANEL_APPLET_EXPAND_MAJOR
| MATE_PANEL_APPLET_EXPAND_MINOR
| MATE_PANEL_APPLET_HAS_HANDLE);
-
+
return TRUE;
}
@@ -204,7 +204,7 @@ display_about_dialog (GtkAction *action,
WinPickerApp *applet)
{
GtkWidget *panel_about_dialog;
-
+
panel_about_dialog = gtk_about_dialog_new ();
g_object_set (panel_about_dialog,
@@ -231,7 +231,7 @@ static void
on_checkbox_toggled (GtkToggleButton *check, gpointer null)
{
gboolean is_active;
-
+
is_active = gtk_toggle_button_get_active (check);
g_settings_set_boolean (mainapp->settings, SHOW_WIN_KEY, is_active);
@@ -272,16 +272,16 @@ display_prefs_dialog (GtkAction *action,
gtk_box_pack_start (GTK_BOX (vbox), check, TRUE, TRUE, 0);
gtk_widget_set_size_request (nb, -1, 100);
-
+
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 0);
-
+
label = gtk_label_new (" ");
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
-
+
gtk_widget_show_all (window);
g_signal_connect (window, "delete-event",
@@ -291,6 +291,6 @@ display_prefs_dialog (GtkAction *action,
G_CALLBACK (gtk_widget_destroy), window);
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), window);
-
+
gtk_window_present (GTK_WINDOW (window));
}
diff --git a/mate-window-picker-applet/task-list.c b/mate-window-picker-applet/task-list.c
index 459ad5a..613d03d 100644
--- a/mate-window-picker-applet/task-list.c
+++ b/mate-window-picker-applet/task-list.c
@@ -2,7 +2,7 @@
* Copyright (C) 2008 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
+ * it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -39,7 +39,7 @@ struct _TaskListPrivate
enum
{
PROP_0,
-
+
PROP_SHOW_ALL_WINDOWS
};
@@ -78,9 +78,9 @@ on_window_opened (WnckScreen *screen,
|| type == WNCK_WINDOW_SPLASHSCREEN
|| type == WNCK_WINDOW_MENU)
return;
-
+
GtkWidget *item = task_item_new (window);
-
+
if (item)
{
gtk_box_pack_start (GTK_BOX (list), item, FALSE, FALSE, 0);
@@ -183,11 +183,11 @@ task_list_new (void)
{
GtkWidget *list = NULL;
- list = g_object_new (TASK_TYPE_LIST,
- "homogeneous", FALSE,
- "spacing", 0,
+ list = g_object_new (TASK_TYPE_LIST,
+ "homogeneous", FALSE,
+ "spacing", 0,
NULL);
-
+
return list;
}
@@ -202,7 +202,7 @@ task_list_get_default (void)
return list;
}
-gboolean
+gboolean
task_list_get_desktop_visible (TaskList *list)
{
GList *windows, *w;
@@ -214,7 +214,7 @@ task_list_get_desktop_visible (TaskList *list)
for (w = windows; w; w = w->next)
{
WnckWindow *window;
-
+
window = w->data;
if (WNCK_IS_WINDOW (window) && !wnck_window_is_minimized (window))
@@ -229,4 +229,3 @@ task_list_get_show_all_windows (TaskList *list)
{
return list->priv->show_all_windows;
}
-
diff --git a/mate-window-picker-applet/task-title.c b/mate-window-picker-applet/task-title.c
index 8e52532..8a8660e 100644
--- a/mate-window-picker-applet/task-title.c
+++ b/mate-window-picker-applet/task-title.c
@@ -2,7 +2,7 @@
* Copyright (C) 2008 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
+ * it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -54,8 +54,8 @@ struct _TaskTitlePrivate
static void disconnect_window (TaskTitle *title);
static gboolean
-on_close_clicked (GtkButton *button,
- GdkEventButton *event,
+on_close_clicked (GtkButton *button,
+ GdkEventButton *event,
TaskTitle *title)
{
TaskTitlePrivate *priv;
@@ -87,10 +87,10 @@ on_enter_notify (GtkWidget *widget,
TaskTitle *title)
{
g_return_val_if_fail (TASK_IS_TITLE (title), FALSE);
-
+
title->priv->mouse_in_close_button = TRUE;
gtk_widget_queue_draw (widget);
-
+
return FALSE;
}
@@ -100,7 +100,7 @@ on_leave_notify (GtkWidget *widget,
TaskTitle *title)
{
g_return_val_if_fail (TASK_IS_TITLE (title), FALSE);
-
+
title->priv->mouse_in_close_button = FALSE;
gtk_widget_queue_draw (widget);
@@ -108,7 +108,7 @@ on_leave_notify (GtkWidget *widget,
}
static gboolean
-on_button_draw (GtkWidget *widget,
+on_button_draw (GtkWidget *widget,
cairo_t *cr,
TaskTitle *title)
{
@@ -116,7 +116,7 @@ on_button_draw (GtkWidget *widget,
TaskTitlePrivate *priv;
priv = title->priv;
-
+
if (priv->mouse_in_close_button)
{
GtkStyle *style = gtk_widget_get_style (widget);
@@ -201,7 +201,7 @@ on_state_changed (WnckWindow *window,
{
gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_NORMAL);
gtk_widget_hide (priv->box);
- }
+ }
}
static void
@@ -224,7 +224,7 @@ on_active_window_changed (WnckScreen *screen,
TaskTitlePrivate *priv;
WnckWindow *act_window;
WnckWindowType type = WNCK_WINDOW_NORMAL;
-
+
g_return_if_fail (TASK_IS_TITLE (title));
priv = title->priv;
@@ -241,16 +241,16 @@ on_active_window_changed (WnckScreen *screen,
|| type == WNCK_WINDOW_SPLASHSCREEN
|| type == WNCK_WINDOW_MENU)
return;
-
+
disconnect_window (title);
if (!WNCK_IS_WINDOW (act_window)
|| wnck_window_get_window_type (act_window) == WNCK_WINDOW_DESKTOP)
- {
+ {
if (priv->show_home_title)
{
gtk_label_set_text (GTK_LABEL (priv->label), _("Home"));
- gtk_image_set_from_pixbuf (GTK_IMAGE (priv->button_image),
+ gtk_image_set_from_pixbuf (GTK_IMAGE (priv->button_image),
priv->quit_icon);
gtk_widget_set_tooltip_text (priv->button,
_("Log off, switch user, lock screen or power "
@@ -268,7 +268,7 @@ on_active_window_changed (WnckScreen *screen,
}
else
{
- gtk_label_set_text (GTK_LABEL (priv->label),
+ gtk_label_set_text (GTK_LABEL (priv->label),
wnck_window_get_name (act_window));
gtk_image_set_from_icon_name (GTK_IMAGE (priv->button_image),
"window-close", GTK_ICON_SIZE_MENU);
@@ -283,7 +283,7 @@ on_active_window_changed (WnckScreen *screen,
G_CALLBACK (on_icon_changed), title);
g_signal_connect_after (act_window, "state-changed",
G_CALLBACK (on_state_changed), title);
- gtk_widget_show (priv->box);
+ gtk_widget_show (priv->box);
priv->window = act_window;
}
@@ -300,17 +300,17 @@ on_active_window_changed (WnckScreen *screen,
&& priv->show_home_title)
{
gtk_label_set_text (GTK_LABEL (priv->label), _("Home"));
- gtk_image_set_from_pixbuf (GTK_IMAGE (priv->button_image),
+ gtk_image_set_from_pixbuf (GTK_IMAGE (priv->button_image),
priv->quit_icon);
gtk_widget_set_tooltip_text (priv->button,
_("Log off, switch user, lock screen or power "
"down the computer"));
gtk_widget_set_tooltip_text (GTK_WIDGET (title),
- _("Home"));
+ _("Home"));
gtk_widget_show (priv->box);
}
else
- {
+ {
gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_NORMAL);
gtk_widget_set_tooltip_text (priv->button, NULL);
gtk_widget_set_tooltip_text (GTK_WIDGET (title), NULL);
@@ -342,7 +342,7 @@ on_button_release (GtkWidget *title, GdkEventButton *event)
if (wnck_window_get_window_type (window) != WNCK_WINDOW_DESKTOP)
{
menu = wnck_action_menu_new (window);
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
+ gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
event->button, event->time);
return TRUE;
}
@@ -354,7 +354,7 @@ on_button_release (GtkWidget *title, GdkEventButton *event)
wnck_window_unmaximize (window);
}
}
-
+
return FALSE;
}
@@ -411,7 +411,7 @@ task_title_init (TaskTitle *title)
GdkPixbuf *pixbuf;
AtkObject *atk;
int width, height;
-
+
priv = title->priv = TASK_TITLE_GET_PRIVATE (title);
priv->screen = wnck_screen_get_default ();
@@ -424,7 +424,7 @@ task_title_init (TaskTitle *title)
gtk_widget_add_events (GTK_WIDGET (title), GDK_ALL_EVENTS_MASK);
priv->align = gtk_alignment_new (0.0, 0.5, 1.0, 1.0);
- gtk_alignment_set_padding (GTK_ALIGNMENT (priv->align),
+ gtk_alignment_set_padding (GTK_ALIGNMENT (priv->align),
0, 0, 6, 6);
gtk_container_add (GTK_CONTAINER (title), priv->align);
@@ -446,19 +446,19 @@ task_title_init (TaskTitle *title)
gtk_box_pack_start (GTK_BOX (priv->box), priv->label, TRUE, TRUE, 0);
gtk_widget_show (priv->label);
- priv->button = g_object_new (GTK_TYPE_EVENT_BOX,
+ priv->button = g_object_new (GTK_TYPE_EVENT_BOX,
"visible-window", FALSE,
"above-child", TRUE,
NULL);
gtk_box_pack_start (GTK_BOX (priv->box), priv->button, FALSE, FALSE, 0);
gtk_widget_show (priv->button);
-
+
atk = gtk_widget_get_accessible (priv->button);
atk_object_set_name (atk, _("Close"));
atk_object_set_description (atk, _("Close current window."));
atk_object_set_role (atk, ATK_ROLE_PUSH_BUTTON);
-
- g_signal_connect (priv->button, "button-release-event",
+
+ g_signal_connect (priv->button, "button-release-event",
G_CALLBACK (on_close_clicked), title);
g_signal_connect (priv->button, "enter-notify-event",
G_CALLBACK (on_enter_notify), title);
@@ -481,16 +481,16 @@ task_title_init (TaskTitle *title)
gtk_widget_set_tooltip_text (priv->button,
_("Log off, switch user, lock screen or power "
"down the computer"));
- gtk_widget_set_tooltip_text (GTK_WIDGET (title), _("Home"));
+ gtk_widget_set_tooltip_text (GTK_WIDGET (title), _("Home"));
if (priv->show_home_title)
gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_ACTIVE);
else
gtk_widget_hide (priv->box);
-
+
gtk_widget_add_events (GTK_WIDGET (title), GDK_ALL_EVENTS_MASK);
-
+
g_signal_connect (priv->screen, "active-window-changed",
G_CALLBACK (on_active_window_changed), title);
g_signal_connect (title, "button-press-event",
@@ -503,10 +503,10 @@ task_title_new (void)
{
GtkWidget *title = NULL;
- title = g_object_new (TASK_TYPE_TITLE,
- "border-width", 0,
+ title = g_object_new (TASK_TYPE_TITLE,
+ "border-width", 0,
"name", "tasklist-button",
- "visible-window", FALSE,
+ "visible-window", FALSE,
NULL);
return title;
diff --git a/mate-window-picker-applet/task-title.h b/mate-window-picker-applet/task-title.h
index 0a1d7ec..5161a9d 100644
--- a/mate-window-picker-applet/task-title.h
+++ b/mate-window-picker-applet/task-title.h
@@ -2,7 +2,7 @@
* Copyright (C) 2008 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
+ * it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -44,10 +44,10 @@
typedef struct _TaskTitle TaskTitle;
typedef struct _TaskTitleClass TaskTitleClass;
typedef struct _TaskTitlePrivate TaskTitlePrivate;
-
+
struct _TaskTitle
{
- GtkEventBox parent;
+ GtkEventBox parent;
TaskTitlePrivate *priv;
};
@@ -63,4 +63,3 @@ GtkWidget * task_title_new (void);
#endif /* _TASK_TITLE_H_ */
-