Remove hard TABs from the sources

Some of them sneaked through, notably during wxNotificationMessage
refactoring.
This commit is contained in:
Vadim Zeitlin
2016-02-18 23:18:00 +01:00
parent 80d4993119
commit 51b70c895e
3 changed files with 34 additions and 34 deletions

View File

@@ -26,7 +26,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/timer.h" #include "wx/timer.h"
#include "wx/sizer.h" #include "wx/sizer.h"
#include "wx/statbmp.h" #include "wx/statbmp.h"
#include "wx/settings.h" #include "wx/settings.h"

View File

@@ -180,14 +180,14 @@ wxPoint wxCursor::GetHotSpot() const
GdkPixbuf *pixbuf = gdk_cursor_get_image(GetCursor()); GdkPixbuf *pixbuf = gdk_cursor_get_image(GetCursor());
if (pixbuf) if (pixbuf)
{ {
wxPoint hotSpot = wxDefaultPosition; wxPoint hotSpot = wxDefaultPosition;
const gchar* opt_xhot = gdk_pixbuf_get_option(pixbuf, "x_hot"); const gchar* opt_xhot = gdk_pixbuf_get_option(pixbuf, "x_hot");
const gchar* opt_yhot = gdk_pixbuf_get_option(pixbuf, "y_hot"); const gchar* opt_yhot = gdk_pixbuf_get_option(pixbuf, "y_hot");
if (opt_xhot && opt_yhot) if (opt_xhot && opt_yhot)
{ {
const int xhot = atoi(opt_xhot); const int xhot = atoi(opt_xhot);
const int yhot = atoi(opt_yhot); const int yhot = atoi(opt_yhot);
hotSpot = wxPoint(xhot, yhot); hotSpot = wxPoint(xhot, yhot);
} }
g_object_unref(pixbuf); g_object_unref(pixbuf);
return hotSpot; return hotSpot;

View File

@@ -1,10 +1,10 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: src/gtk/notifmsg.cpp // Name: src/gtk/notifmsg.cpp
// Purpose: wxNotificationMessage for wxGTK using libnotify. // Purpose: wxNotificationMessage for wxGTK using libnotify.
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Created: 2012-07-25 // Created: 2012-07-25
// Copyright: (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org> // Copyright: (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// ============================================================================ // ============================================================================
@@ -92,7 +92,7 @@ void wxLibNotifyMsgImplActionCallback(NotifyNotification *notification,
gpointer user_data); gpointer user_data);
extern "C" { extern "C" {
static gboolean closed_notification(NotifyNotification *notification, static gboolean closed_notification(NotifyNotification *notification,
const char* WXUNUSED(data), void* user_data); const char* WXUNUSED(data), void* user_data);
} }
@@ -106,7 +106,7 @@ public:
{ {
if ( !wxLibnotifyModule::Initialize() ) if ( !wxLibnotifyModule::Initialize() )
wxLogError(_("Could not initalize libnotify.")); wxLogError(_("Could not initalize libnotify."));
} }
virtual ~wxLibNotifyMsgImpl() virtual ~wxLibNotifyMsgImpl()
@@ -114,7 +114,7 @@ public:
if ( m_notification ) if ( m_notification )
g_object_unref(m_notification); g_object_unref(m_notification);
} }
bool CreateOrUpdateNotification() bool CreateOrUpdateNotification()
{ {
if ( !wxLibnotifyModule::Initialize() ) if ( !wxLibnotifyModule::Initialize() )
@@ -166,9 +166,9 @@ public:
return false; return false;
} }
g_signal_connect(m_notification, "closed", G_CALLBACK(closed_notification), this); g_signal_connect(m_notification, "closed", G_CALLBACK(closed_notification), this);
} }
else else
{ {
@@ -195,7 +195,7 @@ public:
); );
#endif #endif
} }
return true; return true;
} }
@@ -246,7 +246,7 @@ public:
return true; return true;
} }
virtual bool Close() wxOVERRIDE virtual bool Close() wxOVERRIDE
{ {
wxCHECK_MSG( m_notification, false, wxCHECK_MSG( m_notification, false,
@@ -262,41 +262,41 @@ public:
return true; return true;
} }
virtual void SetTitle(const wxString& title) wxOVERRIDE virtual void SetTitle(const wxString& title) wxOVERRIDE
{ {
m_title = title; m_title = title;
} }
virtual void SetMessage(const wxString& message) wxOVERRIDE virtual void SetMessage(const wxString& message) wxOVERRIDE
{ {
m_message = message; m_message = message;
} }
virtual void SetParent(wxWindow *WXUNUSED(parent)) wxOVERRIDE virtual void SetParent(wxWindow *WXUNUSED(parent)) wxOVERRIDE
{ {
} }
virtual void SetFlags(int flags) wxOVERRIDE virtual void SetFlags(int flags) wxOVERRIDE
{ {
m_flags = flags; m_flags = flags;
} }
virtual void SetIcon(const wxIcon& icon) wxOVERRIDE virtual void SetIcon(const wxIcon& icon) wxOVERRIDE
{ {
m_icon = icon; m_icon = icon;
CreateOrUpdateNotification(); CreateOrUpdateNotification();
} }
virtual bool AddAction(wxWindowID actionid, const wxString &label) virtual bool AddAction(wxWindowID actionid, const wxString &label)
{ {
if ( !CreateOrUpdateNotification() ) if ( !CreateOrUpdateNotification() )
return false; return false;
wxString labelStr = label; wxString labelStr = label;
if ( labelStr.empty() ) if ( labelStr.empty() )
labelStr = wxGetStockLabel(actionid, wxSTOCK_NOFLAGS); labelStr = wxGetStockLabel(actionid, wxSTOCK_NOFLAGS);
notify_notification_add_action notify_notification_add_action
( (
m_notification, m_notification,
@@ -306,15 +306,15 @@ public:
this, this,
NULL NULL
); );
return true; return true;
} }
void NotifyClose(int closeReason) void NotifyClose(int closeReason)
{ {
// Values according to the OpenDesktop specification at: // Values according to the OpenDesktop specification at:
// https://developer.gnome.org/notification-spec/ // https://developer.gnome.org/notification-spec/
switch (closeReason) switch (closeReason)
{ {
case 1: // Expired case 1: // Expired
@@ -325,15 +325,15 @@ public:
break; break;
} }
} }
} }
void NotifyAction(wxWindowID actionid) void NotifyAction(wxWindowID actionid)
{ {
wxCommandEvent evt(wxEVT_NOTIFICATION_MESSAGE_ACTION, actionid); wxCommandEvent evt(wxEVT_NOTIFICATION_MESSAGE_ACTION, actionid);
ProcessNotificationEvent(evt); ProcessNotificationEvent(evt);
} }
private: private:
NotifyNotification* m_notification; NotifyNotification* m_notification;
wxString m_title; wxString m_title;
@@ -347,12 +347,12 @@ void wxLibNotifyMsgImplActionCallback(NotifyNotification *WXUNUSED(notification)
gpointer user_data) gpointer user_data)
{ {
wxLibNotifyMsgImpl* impl = (wxLibNotifyMsgImpl*) user_data; wxLibNotifyMsgImpl* impl = (wxLibNotifyMsgImpl*) user_data;
impl->NotifyAction(wxAtoi(action)); impl->NotifyAction(wxAtoi(action));
} }
extern "C" { extern "C" {
static gboolean closed_notification(NotifyNotification *notification, static gboolean closed_notification(NotifyNotification *notification,
const char* WXUNUSED(data), void* user_data) const char* WXUNUSED(data), void* user_data)
{ {
wxLibNotifyMsgImpl* impl = (wxLibNotifyMsgImpl*) user_data; wxLibNotifyMsgImpl* impl = (wxLibNotifyMsgImpl*) user_data;