summaryrefslogtreecommitdiff
path: root/mate-window-picker-applet
diff options
context:
space:
mode:
authorÉtienne Deparis <[email protected]>2019-05-02 08:44:41 +0200
committerMartin Wimpress <[email protected]>2019-09-23 19:49:34 +0100
commit3e666c2bc9c9d84ce80e54d2b5ea3a6d782e280b (patch)
treef93eaefa6c28cb17297a81186098ad04ee032306 /mate-window-picker-applet
parent633425333c38d1cdadfbc29845f8dffb7680fc84 (diff)
downloadmate-netbook-3e666c2bc9c9d84ce80e54d2b5ea3a6d782e280b.tar.bz2
mate-netbook-3e666c2bc9c9d84ce80e54d2b5ea3a6d782e280b.tar.xz
Remove cppcheck warnings with better variables scope
Diffstat (limited to 'mate-window-picker-applet')
-rw-r--r--mate-window-picker-applet/task-title.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mate-window-picker-applet/task-title.c b/mate-window-picker-applet/task-title.c
index 8cc2e72..9c98df8 100644
--- a/mate-window-picker-applet/task-title.c
+++ b/mate-window-picker-applet/task-title.c
@@ -63,8 +63,6 @@ start_logout_dialog (TaskTitle *title)
{
GError *error = NULL;
GAppInfo *app_info;
- GdkAppLaunchContext *launch_context;
- GdkDisplay *display;
GdkScreen *gdkscreen;
g_return_val_if_fail (TASK_IS_TITLE (title), FALSE);
@@ -75,6 +73,8 @@ start_logout_dialog (TaskTitle *title)
G_APP_INFO_CREATE_NONE, &error);
if (!error) {
+ GdkDisplay *display;
+ GdkAppLaunchContext *launch_context;
display = gdk_screen_get_display (gdkscreen);
launch_context = gdk_display_get_app_launch_context (display);
gdk_app_launch_context_set_screen (launch_context, gdkscreen);
@@ -84,7 +84,6 @@ start_logout_dialog (TaskTitle *title)
}
GtkWidget *dialog;
-
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
_("There was an error executing '%s': %s"),
@@ -373,7 +372,6 @@ on_button_release (GtkWidget *title, GdkEventButton *event)
{
TaskTitlePrivate *priv;
WnckWindow *window;
- GtkWidget *menu;
g_return_val_if_fail (TASK_IS_TITLE (title), FALSE);
priv = TASK_TITLE_GET_PRIVATE (title);
@@ -386,6 +384,7 @@ on_button_release (GtkWidget *title, GdkEventButton *event)
{
if (wnck_window_get_window_type (window) != WNCK_WINDOW_DESKTOP)
{
+ GtkWidget *menu;
menu = wnck_action_menu_new (window);
gtk_menu_popup_at_pointer (GTK_MENU (menu), (GdkEvent*)event);
return TRUE;
@@ -554,7 +553,6 @@ task_title_init (TaskTitle *title)
TaskTitlePrivate *priv;
GdkScreen *gdkscreen;
GtkIconTheme *theme;
- GdkPixbuf *pixbuf;
AtkObject *atk;
int width, height;