[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 27/473: Replace null constant pointer.
noreply at xfce.org
noreply at xfce.org
Mon Feb 16 23:53:17 CET 2015
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit 36e12dda4bffce7486500cccae6c2fad9760421b
Author: Graeme Gott <graeme at gottcode.org>
Date: Wed Jun 26 14:51:15 2013 -0400
Replace null constant pointer.
Downgrade to C++98.
---
src/applications_page.cpp | 20 +++++++++----------
src/configuration_dialog.cpp | 8 ++++----
src/filter_page.cpp | 10 +++++-----
src/launcher.cpp | 12 ++++++------
src/launcher_model.cpp | 8 ++++----
src/launcher_view.cpp | 18 ++++++++---------
src/list_page.cpp | 2 +-
src/menu.cpp | 30 ++++++++++++++--------------
src/page.cpp | 44 +++++++++++++++++++++---------------------
src/panel_plugin.cpp | 8 ++++----
src/resizer_widget.cpp | 4 ++--
src/search_page.cpp | 10 +++++-----
src/section_button.cpp | 2 +-
13 files changed, 88 insertions(+), 88 deletions(-)
diff --git a/src/applications_page.cpp b/src/applications_page.cpp
index 86f5b9d..fc91a5e 100644
--- a/src/applications_page.cpp
+++ b/src/applications_page.cpp
@@ -47,8 +47,8 @@ ApplicationsPage::Category::Category(GarconMenuDirectory* directory)
ApplicationsPage::ApplicationsPage(Menu* menu) :
FilterPage(menu),
- m_garcon_menu(nullptr),
- m_current_category(nullptr)
+ m_garcon_menu(NULL),
+ m_current_category(NULL)
{
// Set desktop environment for applications
const gchar* desktop = g_getenv("XDG_CURRENT_DESKTOP");
@@ -58,7 +58,7 @@ ApplicationsPage::ApplicationsPage(Menu* menu) :
}
else if (*desktop == '\0')
{
- desktop = nullptr;
+ desktop = NULL;
}
garcon_set_environment(desktop);
}
@@ -84,7 +84,7 @@ void ApplicationsPage::apply_filter(GtkToggleButton* togglebutton)
// Apply filter
m_current_category = i->second;
refilter();
- m_current_category = nullptr;
+ m_current_category = NULL;
// Scroll to top
GtkTreeIter iter;
@@ -106,7 +106,7 @@ bool ApplicationsPage::on_filter(GtkTreeModel* model, GtkTreeIter* iter)
return true;
}
- Launcher* launcher = nullptr;
+ Launcher* launcher = NULL;
gtk_tree_model_get(model, iter, LauncherModel::COLUMN_LAUNCHER, &launcher, -1);
auto category = m_categories[m_current_category];
@@ -123,7 +123,7 @@ void ApplicationsPage::reload_applications()
// Populate map of menu data
m_garcon_menu = garcon_menu_new_applications();
g_object_ref(m_garcon_menu);
- if (garcon_menu_load(m_garcon_menu, nullptr, nullptr))
+ if (garcon_menu_load(m_garcon_menu, NULL, NULL))
{
g_signal_connect_swapped(m_garcon_menu, "reload-required", SLOT_CALLBACK(ApplicationsPage::reload_applications), this);
load_menu(m_garcon_menu);
@@ -189,7 +189,7 @@ void ApplicationsPage::clear_applications()
if (m_garcon_menu)
{
g_object_unref(m_garcon_menu);
- m_garcon_menu = nullptr;
+ m_garcon_menu = NULL;
}
// Clear menu item cache
@@ -224,7 +224,7 @@ void ApplicationsPage::load_menu(GarconMenu* menu)
// Add submenus
GList* menus = garcon_menu_get_menus(menu);
- for (GList* li = menus; li != nullptr; li = li->next)
+ for (GList* li = menus; li != NULL; li = li->next)
{
load_menu(GARCON_MENU(li->data));
}
@@ -252,7 +252,7 @@ void ApplicationsPage::load_menu(GarconMenu* menu)
m_categories.erase(i);
delete m_current_category;
}
- m_current_category = nullptr;
+ m_current_category = NULL;
}
// Listen for menu changes
@@ -296,7 +296,7 @@ void ApplicationsPage::reload_categories()
// Add button for all applications
GtkRadioButton* all_button = new_section_button("applications-other", _("All"));
g_signal_connect(all_button, "toggled", SLOT_CALLBACK(ApplicationsPage::apply_filter), this);
- m_category_buttons[all_button] = nullptr;
+ m_category_buttons[all_button] = NULL;
category_buttons.push_back(all_button);
// Create sorted list of categories
diff --git a/src/configuration_dialog.cpp b/src/configuration_dialog.cpp
index e1293fd..92725ad 100644
--- a/src/configuration_dialog.cpp
+++ b/src/configuration_dialog.cpp
@@ -33,7 +33,7 @@ using namespace WhiskerMenu;
static void whiskermenu_config_dialog_delete(ConfigurationDialog* dialog)
{
delete dialog;
- dialog = nullptr;
+ dialog = NULL;
}
//-----------------------------------------------------------------------------
@@ -42,13 +42,13 @@ ConfigurationDialog::ConfigurationDialog(PanelPlugin* plugin) :
m_plugin(plugin)
{
// Create dialog window
- GtkWindow* window = nullptr;
+ GtkWindow* window = NULL;
GtkWidget* toplevel = gtk_widget_get_toplevel(m_plugin->get_button());
if (gtk_widget_is_toplevel(toplevel))
{
window = GTK_WINDOW(toplevel);
}
- m_window = xfce_titled_dialog_new_with_buttons(_("Whisker Menu"), window, GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, nullptr);
+ m_window = xfce_titled_dialog_new_with_buttons(_("Whisker Menu"), window, GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
gtk_window_set_icon_name(GTK_WINDOW(m_window), GTK_STOCK_PROPERTIES);
gtk_window_set_position(GTK_WINDOW(m_window), GTK_WIN_POS_CENTER);
g_signal_connect(m_window, "response", SLOT_CALLBACK(ConfigurationDialog::response), this);
@@ -117,7 +117,7 @@ void ConfigurationDialog::choose_icon()
GTK_WINDOW(m_window),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
- nullptr);
+ NULL);
gtk_dialog_set_default_response(GTK_DIALOG(chooser), GTK_RESPONSE_ACCEPT);
gtk_dialog_set_alternative_button_order(GTK_DIALOG(chooser),
diff --git a/src/filter_page.cpp b/src/filter_page.cpp
index 29cb89a..87d5476 100644
--- a/src/filter_page.cpp
+++ b/src/filter_page.cpp
@@ -24,7 +24,7 @@ using namespace WhiskerMenu;
FilterPage::FilterPage(Menu* menu) :
Page(menu),
- m_filter_model(nullptr)
+ m_filter_model(NULL)
{
}
@@ -39,7 +39,7 @@ FilterPage::~FilterPage()
GtkTreeModel* FilterPage::get_model() const
{
- return m_filter_model ? gtk_tree_model_filter_get_model(m_filter_model) : nullptr;
+ return m_filter_model ? gtk_tree_model_filter_get_model(m_filter_model) : NULL;
}
//-----------------------------------------------------------------------------
@@ -65,8 +65,8 @@ void FilterPage::set_model(GtkTreeModel* model)
{
unset_model();
- m_filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_filter_new(model, nullptr));
- gtk_tree_model_filter_set_visible_func(m_filter_model, (GtkTreeModelFilterVisibleFunc)&FilterPage::filter_visible, this, nullptr);
+ m_filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_filter_new(model, NULL));
+ gtk_tree_model_filter_set_visible_func(m_filter_model, (GtkTreeModelFilterVisibleFunc)&FilterPage::filter_visible, this, NULL);
get_view()->set_model(GTK_TREE_MODEL(m_filter_model));
}
@@ -79,7 +79,7 @@ void FilterPage::unset_model()
if (m_filter_model)
{
g_object_unref(m_filter_model);
- m_filter_model = nullptr;
+ m_filter_model = NULL;
}
}
diff --git a/src/launcher.cpp b/src/launcher.cpp
index f2db143..dd6b65d 100644
--- a/src/launcher.cpp
+++ b/src/launcher.cpp
@@ -78,8 +78,8 @@ static void replace_with_quoted_string(std::string& command, size_t& index, gcha
Launcher::Launcher(GarconMenuItem* item) :
m_item(item),
- m_icon(nullptr),
- m_text(nullptr)
+ m_icon(NULL),
+ m_text(NULL)
{
garcon_menu_item_ref(m_item);
@@ -264,12 +264,12 @@ void Launcher::run(GdkScreen* screen) const
// Parse and spawn command
gchar** argv;
gboolean result = false;
- GError* error = nullptr;
- if (g_shell_parse_argv(command.c_str(), nullptr, &argv, &error))
+ GError* error = NULL;
+ if (g_shell_parse_argv(command.c_str(), NULL, &argv, &error))
{
result = xfce_spawn_on_screen(screen,
garcon_menu_item_get_path(m_item),
- argv, nullptr, G_SPAWN_SEARCH_PATH,
+ argv, NULL, G_SPAWN_SEARCH_PATH,
garcon_menu_item_supports_startup_notification(m_item),
gtk_get_current_event_time(),
garcon_menu_item_get_icon_name(m_item),
@@ -279,7 +279,7 @@ void Launcher::run(GdkScreen* screen) const
if (G_UNLIKELY(!result))
{
- xfce_dialog_show_error(nullptr, error, _("Failed to execute command \"%s\"."), string);
+ xfce_dialog_show_error(NULL, error, _("Failed to execute command \"%s\"."), string);
g_error_free(error);
}
}
diff --git a/src/launcher_model.cpp b/src/launcher_model.cpp
index 0a9b6bf..d308436 100644
--- a/src/launcher_model.cpp
+++ b/src/launcher_model.cpp
@@ -57,7 +57,7 @@ LauncherModel::~LauncherModel()
void LauncherModel::insert_item(Launcher* launcher, int position)
{
gtk_list_store_insert_with_values(
- m_model, nullptr, position,
+ m_model, NULL, position,
COLUMN_ICON, launcher->get_icon(),
COLUMN_TEXT, launcher->get_text(),
COLUMN_LAUNCHER, launcher,
@@ -70,7 +70,7 @@ void LauncherModel::remove_item(Launcher* launcher)
{
GtkTreeModel* model = GTK_TREE_MODEL(m_model);
GtkTreeIter iter;
- Launcher* test_launcher = nullptr;
+ Launcher* test_launcher = NULL;
bool valid = gtk_tree_model_get_iter_first(model, &iter);
while (valid)
@@ -101,14 +101,14 @@ void LauncherModel::remove_first_item()
void LauncherModel::remove_last_item()
{
GtkTreeModel* model = GTK_TREE_MODEL(m_model);
- gint size = gtk_tree_model_iter_n_children(model, nullptr);
+ gint size = gtk_tree_model_iter_n_children(model, NULL);
if (!size)
{
return;
}
GtkTreeIter iter;
- if (gtk_tree_model_iter_nth_child(model, &iter, nullptr, size - 1))
+ if (gtk_tree_model_iter_nth_child(model, &iter, NULL, size - 1))
{
gtk_list_store_remove(m_model, &iter);
}
diff --git a/src/launcher_view.cpp b/src/launcher_view.cpp
index 63da705..3a57ae3 100644
--- a/src/launcher_view.cpp
+++ b/src/launcher_view.cpp
@@ -30,7 +30,7 @@ using namespace WhiskerMenu;
//-----------------------------------------------------------------------------
LauncherView::LauncherView() :
- m_model(nullptr)
+ m_model(NULL)
{
// Create the view
m_view = GTK_TREE_VIEW(exo_tree_view_new());
@@ -48,12 +48,12 @@ LauncherView::LauncherView() :
int width = 0, height = 0;
gtk_icon_size_lookup(GTK_ICON_SIZE_DND, &width, &height);
GtkCellRenderer* icon_renderer = exo_cell_renderer_icon_new();
- g_object_set(icon_renderer, "size", std::max(width, height), nullptr);
+ g_object_set(icon_renderer, "size", std::max(width, height), NULL);
gtk_tree_view_column_pack_start(column, icon_renderer, false);
gtk_tree_view_column_add_attribute(column, icon_renderer, "icon", LauncherModel::COLUMN_ICON);
GtkCellRenderer* text_renderer = gtk_cell_renderer_text_new();
- g_object_set(text_renderer, "ellipsize", PANGO_ELLIPSIZE_END, nullptr);
+ g_object_set(text_renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_tree_view_column_pack_start(column, text_renderer, true);
gtk_tree_view_column_add_attribute(column, text_renderer, "markup", LauncherModel::COLUMN_TEXT);
@@ -73,7 +73,7 @@ LauncherView::LauncherView() :
LauncherView::~LauncherView()
{
- m_model = nullptr;
+ m_model = NULL;
g_object_unref(m_view);
}
@@ -82,10 +82,10 @@ LauncherView::~LauncherView()
GtkTreePath* LauncherView::get_selected_path() const
{
- GtkTreePath* path = nullptr;
+ GtkTreePath* path = NULL;
GtkTreeSelection* selection = gtk_tree_view_get_selection(m_view);
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected(selection, nullptr, &iter))
+ if (gtk_tree_selection_get_selected(selection, NULL, &iter))
{
path = gtk_tree_model_get_path(m_model, &iter);
}
@@ -104,7 +104,7 @@ void LauncherView::activate_path(GtkTreePath* path)
void LauncherView::scroll_to_path(GtkTreePath* path)
{
- gtk_tree_view_scroll_to_cell(m_view, path, nullptr, true, 0.5f, 0.5f);
+ gtk_tree_view_scroll_to_cell(m_view, path, NULL, true, 0.5f, 0.5f);
}
//-----------------------------------------------------------------------------
@@ -150,8 +150,8 @@ void LauncherView::set_model(GtkTreeModel* model)
void LauncherView::unset_model()
{
- m_model = nullptr;
- gtk_tree_view_set_model(m_view, nullptr);
+ m_model = NULL;
+ gtk_tree_view_set_model(m_view, NULL);
}
//-----------------------------------------------------------------------------
diff --git a/src/list_page.cpp b/src/list_page.cpp
index 2f39c0a..c5c751e 100644
--- a/src/list_page.cpp
+++ b/src/list_page.cpp
@@ -35,7 +35,7 @@ static std::vector<std::string> read_list(XfceRc* rc, const gchar* key, std::vec
std::vector<std::string> list;
gchar** values = xfce_rc_read_list_entry(rc, key, ",");
- for (size_t i = 0; values[i] != nullptr; ++i)
+ for (size_t i = 0; values[i] != NULL; ++i)
{
list.push_back(values[i]);
}
diff --git a/src/menu.cpp b/src/menu.cpp
index 0fd9806..066df59 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -53,7 +53,7 @@ static GtkButton* new_action_button(const gchar* icon, const gchar* text)
//-----------------------------------------------------------------------------
Menu::Menu(XfceRc* settings) :
- m_window(nullptr),
+ m_window(NULL),
m_geometry{0,0,400,500},
m_layout_left(true),
m_layout_bottom(true)
@@ -74,7 +74,7 @@ Menu::Menu(XfceRc* settings) :
g_signal_connect(m_window, "configure-event", SLOT_CALLBACK(Menu::on_configure_event), this);
// Create the border of the window
- GtkWidget* frame = gtk_frame_new(nullptr);
+ GtkWidget* frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT);
gtk_container_add(GTK_CONTAINER(m_window), frame);
@@ -85,7 +85,7 @@ Menu::Menu(XfceRc* settings) :
name = g_get_user_name();
}
gchar* username = g_markup_printf_escaped("<b><big>%s</big></b>", name);
- m_username = GTK_LABEL(gtk_label_new(nullptr));
+ m_username = GTK_LABEL(gtk_label_new(NULL));
gtk_label_set_markup(m_username, username);
gtk_misc_set_alignment(GTK_MISC(m_username), 0.0f, 0.5f);
g_free(username);
@@ -473,7 +473,7 @@ gboolean Menu::on_leave_notify_event(GtkWidget*, GdkEventCrossing* event)
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
GDK_POINTER_MOTION_MASK
),
- nullptr, nullptr, event->time);
+ NULL, NULL, event->time);
}
return false;
@@ -505,7 +505,7 @@ gboolean Menu::on_key_press_event(GtkWidget* widget, GdkEventKey* event)
// Make up and down keys always scroll current list of applications
if ((event->keyval == GDK_KEY_Up) || (event->keyval == GDK_KEY_Down))
{
- GtkWidget* widget = nullptr;
+ GtkWidget* widget = NULL;
if (gtk_widget_get_visible(m_search_results->get_widget()))
{
widget = m_search_results->get_view()->get_widget();
@@ -553,7 +553,7 @@ gboolean Menu::on_map_event(GtkWidget*, GdkEventAny*)
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
GDK_POINTER_MOTION_MASK
),
- nullptr, nullptr, gtk_get_current_event_time());
+ NULL, NULL, gtk_get_current_event_time());
// Focus search entry
gtk_widget_grab_focus(GTK_WIDGET(m_search_entry));
@@ -617,7 +617,7 @@ void Menu::show_favorites()
void Menu::search()
{
// Fetch search string
- gchar* filter_string = nullptr;
+ gchar* filter_string = NULL;
const gchar* text = gtk_entry_get_text(m_search_entry);
if (!exo_str_is_empty(text))
{
@@ -627,7 +627,7 @@ void Menu::search()
}
// Update search entry icon
- bool visible = filter_string != nullptr;
+ bool visible = filter_string != NULL;
gtk_entry_set_icon_from_stock(m_search_entry, GTK_ENTRY_ICON_SECONDARY, !visible ? GTK_STOCK_FIND : GTK_STOCK_CLEAR);
gtk_entry_set_icon_activatable(m_search_entry, GTK_ENTRY_ICON_SECONDARY, visible);
@@ -647,7 +647,7 @@ void Menu::search()
}
// Apply filter
- m_search_results->set_filter((visible && (g_utf8_strlen(filter_string, -1) > 2)) ? filter_string : nullptr);
+ m_search_results->set_filter((visible && (g_utf8_strlen(filter_string, -1) > 2)) ? filter_string : NULL);
g_free(filter_string);
}
@@ -657,10 +657,10 @@ void Menu::launch_settings_manager()
{
hide();
- GError* error = nullptr;
+ GError* error = NULL;
if (g_spawn_command_line_async("xfce4-settings-manager", &error) == false)
{
- xfce_dialog_show_error(nullptr, error, _("Failed to open settings manager."));
+ xfce_dialog_show_error(NULL, error, _("Failed to open settings manager."));
g_error_free(error);
}
}
@@ -671,10 +671,10 @@ void Menu::lock_screen()
{
hide();
- GError* error = nullptr;
+ GError* error = NULL;
if (g_spawn_command_line_async("xflock4", &error) == false)
{
- xfce_dialog_show_error(nullptr, error, _("Failed to lock screen."));
+ xfce_dialog_show_error(NULL, error, _("Failed to lock screen."));
g_error_free(error);
}
}
@@ -685,10 +685,10 @@ void Menu::log_out()
{
hide();
- GError* error = nullptr;
+ GError* error = NULL;
if (g_spawn_command_line_async("xfce4-session-logout", &error) == false)
{
- xfce_dialog_show_error(nullptr, error, _("Failed to log out."));
+ xfce_dialog_show_error(NULL, error, _("Failed to log out."));
g_error_free(error);
}
}
diff --git a/src/page.cpp b/src/page.cpp
index a3a093e..93c9e71 100644
--- a/src/page.cpp
+++ b/src/page.cpp
@@ -34,7 +34,7 @@ using namespace WhiskerMenu;
Page::Page(Menu* menu) :
m_menu(menu),
- m_selected_path(nullptr)
+ m_selected_path(NULL)
{
// Create view
m_view = new LauncherView;
@@ -44,7 +44,7 @@ Page::Page(Menu* menu) :
g_signal_connect_swapped(m_view->get_widget(), "start-interactive-search", G_CALLBACK(gtk_widget_grab_focus), m_menu->get_search_entry());
// Add scrolling to view
- m_widget = gtk_scrolled_window_new(nullptr, nullptr);
+ m_widget = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(m_widget), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(m_widget), GTK_SHADOW_ETCHED_IN);
gtk_container_add(GTK_CONTAINER(m_widget), m_view->get_widget());
@@ -69,7 +69,7 @@ Page::~Page()
Launcher* Page::get_selected_launcher() const
{
- Launcher* launcher = nullptr;
+ Launcher* launcher = NULL;
if (m_selected_path)
{
GtkTreeModel* model = m_view->get_model();
@@ -89,7 +89,7 @@ void Page::launcher_activated(GtkTreeView* view, GtkTreePath* path, GtkTreeViewC
gtk_tree_model_get_iter(model, &iter, path);
// Find launcher
- Launcher* launcher = nullptr;
+ Launcher* launcher = NULL;
gtk_tree_model_get(model, &iter, LauncherModel::COLUMN_LAUNCHER, &launcher, -1);
// Add to recent
@@ -108,7 +108,7 @@ gboolean Page::view_button_press_event(GtkWidget* view, GdkEventButton* event)
{
GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected(selection, nullptr, &iter)
+ if (gtk_tree_selection_get_selected(selection, NULL, &iter)
&& (event->type == GDK_BUTTON_PRESS)
&& (event->button == 3))
{
@@ -125,9 +125,9 @@ gboolean Page::view_popup_menu_event(GtkWidget* view)
{
GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
GtkTreeIter iter;
- if (gtk_tree_selection_get_selected(selection, nullptr, &iter))
+ if (gtk_tree_selection_get_selected(selection, NULL, &iter))
{
- create_context_menu(&iter, nullptr);
+ create_context_menu(&iter, NULL);
return true;
}
@@ -162,7 +162,7 @@ void Page::create_context_menu(GtkTreeIter* iter, GdkEventButton* event)
g_signal_connect(menu, "selection-done", SLOT_CALLBACK(Page::destroy_context_menu), this);
// Add menu items
- GtkWidget* menuitem = nullptr;
+ GtkWidget* menuitem = NULL;
if (!m_menu->get_favorites()->contains(get_selected_launcher()))
{
@@ -190,7 +190,7 @@ void Page::create_context_menu(GtkTreeIter* iter, GdkEventButton* event)
// Show context menu
int button = 0;
int event_time;
- GtkMenuPositionFunc position_func = nullptr;
+ GtkMenuPositionFunc position_func = NULL;
if (event)
{
button = event->button;
@@ -202,8 +202,8 @@ void Page::create_context_menu(GtkTreeIter* iter, GdkEventButton* event)
event_time = gtk_get_current_event_time ();
}
- gtk_menu_attach_to_widget(GTK_MENU(menu), m_view->get_widget(), nullptr);
- gtk_menu_popup(GTK_MENU(menu), nullptr, nullptr, position_func, this, button, event_time);
+ gtk_menu_attach_to_widget(GTK_MENU(menu), m_view->get_widget(), NULL);
+ gtk_menu_popup(GTK_MENU(menu), NULL, NULL, position_func, this, button, event_time);
}
//-----------------------------------------------------------------------------
@@ -213,7 +213,7 @@ void Page::destroy_context_menu(GtkMenuShell* menu)
if (m_selected_path)
{
gtk_tree_path_free(m_selected_path);
- m_selected_path = nullptr;
+ m_selected_path = NULL;
}
gtk_tree_view_set_hover_selection(GTK_TREE_VIEW(m_view->get_widget()), true);
@@ -258,10 +258,10 @@ void Page::add_selected_to_desktop()
g_free(basename);
// Copy launcher to desktop folder
- GError* error = nullptr;
- if (!g_file_copy(source_file, destination_file, G_FILE_COPY_NONE, nullptr, nullptr, nullptr, &error))
+ GError* error = NULL;
+ if (!g_file_copy(source_file, destination_file, G_FILE_COPY_NONE, NULL, NULL, NULL, &error))
{
- xfce_dialog_show_error(nullptr, error, _("Unable to add launcher to desktop."));
+ xfce_dialog_show_error(NULL, error, _("Unable to add launcher to desktop."));
g_error_free(error);
}
@@ -275,20 +275,20 @@ void Page::add_selected_to_desktop()
void Page::add_selected_to_panel()
{
// Connect to Xfce panel through D-Bus
- GError* error = nullptr;
+ GError* error = NULL;
GDBusProxy* proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
- nullptr,
+ NULL,
"org.xfce.Panel",
"/org/xfce/Panel",
"org.xfce.Panel",
- nullptr,
+ NULL,
&error);
if (proxy)
{
// Fetch launcher desktop ID
Launcher* launcher = get_selected_launcher();
- const gchar* parameters[] = { garcon_menu_item_get_desktop_id(launcher->get_item()), nullptr };
+ const gchar* parameters[] = { garcon_menu_item_get_desktop_id(launcher->get_item()), NULL };
// Tell panel to add item
if (!g_dbus_proxy_call_sync(proxy,
@@ -296,10 +296,10 @@ void Page::add_selected_to_panel()
g_variant_new("(s^as)", "launcher", parameters),
G_DBUS_CALL_FLAGS_NONE,
-1,
- nullptr,
+ NULL,
&error))
{
- xfce_dialog_show_error(nullptr, error, _("Unable to add launcher to panel."));
+ xfce_dialog_show_error(NULL, error, _("Unable to add launcher to panel."));
g_error_free(error);
}
@@ -308,7 +308,7 @@ void Page::add_selected_to_panel()
}
else
{
- xfce_dialog_show_error(nullptr, error, _("Unable to add launcher to panel."));
+ xfce_dialog_show_error(NULL, error, _("Unable to add launcher to panel."));
g_error_free(error);
}
}
diff --git a/src/panel_plugin.cpp b/src/panel_plugin.cpp
index 48a59ef..c454f29 100644
--- a/src/panel_plugin.cpp
+++ b/src/panel_plugin.cpp
@@ -34,7 +34,7 @@ extern "C" void whiskermenu_construct(XfcePanelPlugin* plugin)
static void whiskermenu_free(XfcePanelPlugin*, PanelPlugin* whiskermenu)
{
delete whiskermenu;
- whiskermenu = nullptr;
+ whiskermenu = NULL;
}
//-----------------------------------------------------------------------------
@@ -42,7 +42,7 @@ static void whiskermenu_free(XfcePanelPlugin*, PanelPlugin* whiskermenu)
PanelPlugin::PanelPlugin(XfcePanelPlugin* plugin) :
m_plugin(plugin),
m_button_icon_name("xfce4-whiskermenu"),
- m_menu(nullptr)
+ m_menu(NULL)
{
// Load settings
gchar* file = xfce_panel_plugin_lookup_rc_file(m_plugin);
@@ -60,7 +60,7 @@ PanelPlugin::PanelPlugin(XfcePanelPlugin* plugin) :
}
else
{
- m_menu = new Menu(nullptr);
+ m_menu = new Menu(NULL);
}
g_signal_connect_swapped(m_menu->get_widget(), "unmap", SLOT_CALLBACK(PanelPlugin::menu_hidden), this);
@@ -91,7 +91,7 @@ PanelPlugin::PanelPlugin(XfcePanelPlugin* plugin) :
PanelPlugin::~PanelPlugin()
{
delete m_menu;
- m_menu = nullptr;
+ m_menu = NULL;
gtk_widget_destroy(m_button);
}
diff --git a/src/resizer_widget.cpp b/src/resizer_widget.cpp
index 2370f5b..54b2751 100644
--- a/src/resizer_widget.cpp
+++ b/src/resizer_widget.cpp
@@ -22,7 +22,7 @@ using namespace WhiskerMenu;
ResizerWidget::ResizerWidget(GtkWindow* window) :
m_window(window),
- m_cursor(nullptr)
+ m_cursor(NULL)
{
m_alignment = GTK_ALIGNMENT(gtk_alignment_new(1,0,0,0));
@@ -117,7 +117,7 @@ gboolean ResizerWidget::on_enter_notify_event(GtkWidget* widget, GdkEventCrossin
gboolean ResizerWidget::on_leave_notify_event(GtkWidget* widget, GdkEventCrossing*)
{
GdkWindow* window = gtk_widget_get_window(widget);
- gdk_window_set_cursor(window, nullptr);
+ gdk_window_set_cursor(window, NULL);
return false;
}
diff --git a/src/search_page.cpp b/src/search_page.cpp
index 5d26e6d..facf0b7 100644
--- a/src/search_page.cpp
+++ b/src/search_page.cpp
@@ -32,7 +32,7 @@ using namespace WhiskerMenu;
SearchPage::SearchPage(Menu* menu) :
FilterPage(menu),
- m_filter_matching_path(nullptr)
+ m_filter_matching_path(NULL)
{
get_view()->set_selection_mode(GTK_SELECTION_BROWSE);
@@ -74,7 +74,7 @@ void SearchPage::set_filter(const gchar* filter)
// Scroll to and select first result that begins with search string
GtkTreePath* path = convert_child_path_to_path(m_filter_matching_path);
gtk_tree_path_free(m_filter_matching_path);
- m_filter_matching_path = nullptr;
+ m_filter_matching_path = NULL;
get_view()->select_path(path);
get_view()->scroll_to_path(path);
@@ -122,7 +122,7 @@ bool SearchPage::on_filter(GtkTreeModel* model, GtkTreeIter* iter)
}
// Check if launcher search string contains text
- Launcher* launcher = nullptr;
+ Launcher* launcher = NULL;
gtk_tree_model_get(model, iter, LauncherModel::COLUMN_LAUNCHER, &launcher, -1);
gchar* result = g_strstr_len(launcher->get_search_text(), -1, m_filter_string.c_str());
@@ -132,7 +132,7 @@ bool SearchPage::on_filter(GtkTreeModel* model, GtkTreeIter* iter)
m_filter_matching_path = gtk_tree_model_get_path(model, iter);
}
- return result != nullptr;
+ return result != NULL;
}
//-----------------------------------------------------------------------------
@@ -153,7 +153,7 @@ gboolean SearchPage::search_entry_key_press(GtkWidget* widget, GdkEventKey* even
{
GtkEntry* entry = GTK_ENTRY(widget);
const gchar* text = gtk_entry_get_text(entry);
- if ((text != nullptr) && (*text != '\0'))
+ if ((text != NULL) && (*text != '\0'))
{
gtk_entry_set_text(entry, "");
return true;
diff --git a/src/section_button.cpp b/src/section_button.cpp
index 27a3f62..e5c966f 100644
--- a/src/section_button.cpp
+++ b/src/section_button.cpp
@@ -20,7 +20,7 @@
GtkRadioButton* WhiskerMenu::new_section_button(const gchar* icon, const gchar* text)
{
- GtkWidget* button = gtk_radio_button_new(nullptr);
+ GtkWidget* button = gtk_radio_button_new(NULL);
gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(button), false);
gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
gtk_button_set_focus_on_click(GTK_BUTTON(button), false);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list