From 06b511f10395f06b4013486ab50506f2d9e7b734 Mon Sep 17 00:00:00 2001 From: William Wold Date: Fri, 16 Oct 2020 10:24:36 -0700 Subject: Switch to C-style comments as requested --- applets/wncklet/showdesktop.c | 8 ++++---- applets/wncklet/wayland-backend.c | 10 +++++----- applets/wncklet/wayland-backend.h | 4 ++-- applets/wncklet/window-list.c | 36 ++++++++++++++++++------------------ applets/wncklet/window-menu.c | 8 ++++---- applets/wncklet/wncklet.c | 4 ++-- applets/wncklet/workspace-switcher.c | 36 ++++++++++++++++++------------------ 7 files changed, 53 insertions(+), 53 deletions(-) diff --git a/applets/wncklet/showdesktop.c b/applets/wncklet/showdesktop.c index 35c25ef5..c3454a0f 100644 --- a/applets/wncklet/showdesktop.c +++ b/applets/wncklet/showdesktop.c @@ -372,7 +372,7 @@ static void show_desktop_applet_realized(MatePanelApplet* applet, gpointer data) #ifdef HAVE_X11 if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) sdd->wnck_screen = wnck_screen_get(gdk_x11_screen_get_screen_number (screen)); -#endif // HAVE_X11 +#endif /* HAVE_X11 */ if (sdd->wnck_screen != NULL) wncklet_connect_while_alive(sdd->wnck_screen, "showing_desktop_changed", G_CALLBACK(show_desktop_changed_callback), sdd, sdd->applet); @@ -529,7 +529,7 @@ static void button_toggled_callback(GtkWidget* button, ShowDesktopData* sdd) } else #endif - { // not using X11 + { /* not using X11 */ can_show_desktop = FALSE; } @@ -566,7 +566,7 @@ static void button_toggled_callback(GtkWidget* button, ShowDesktopData* sdd) #ifdef HAVE_X11 if (sdd->wnck_screen != NULL) wnck_screen_toggle_showing_desktop(sdd->wnck_screen, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button))); -#endif // HAVE_X11 +#endif /* HAVE_X11 */ update_button_display (sdd); } @@ -576,7 +576,7 @@ static void show_desktop_changed_callback(WnckScreen* screen, ShowDesktopData* s #ifdef HAVE_X11 if (sdd->wnck_screen != NULL) sdd->showing_desktop = wnck_screen_get_showing_desktop(sdd->wnck_screen); -#endif // HAVE_X11 +#endif /* HAVE_X11 */ update_button_state (sdd); } diff --git a/applets/wncklet/wayland-backend.c b/applets/wncklet/wayland-backend.c index 16a35f34..e15c28d9 100644 --- a/applets/wncklet/wayland-backend.c +++ b/applets/wncklet/wayland-backend.c @@ -65,7 +65,7 @@ wl_registry_handle_global (void *_data, const char *interface, uint32_t version) { - // pull out needed globals + /* pull out needed globals */ if (strcmp (interface, zwlr_foreign_toplevel_manager_v1_interface.name) == 0) { g_warn_if_fail (zwlr_foreign_toplevel_manager_v1_interface.version == 2); @@ -208,7 +208,7 @@ foreign_toplevel_handle_app_id (void *data, struct zwlr_foreign_toplevel_handle_v1 *toplevel, const char *app_id) { - // ignore + /* ignore */ } static void @@ -216,7 +216,7 @@ foreign_toplevel_handle_output_enter (void *data, struct zwlr_foreign_toplevel_handle_v1 *toplevel, struct wl_output *output) { - // ignore + /* ignore */ } static void @@ -224,7 +224,7 @@ foreign_toplevel_handle_output_leave (void *data, struct zwlr_foreign_toplevel_handle_v1 *toplevel, struct wl_output *output) { - // ignore + /* ignore */ } static void @@ -257,7 +257,7 @@ static void foreign_toplevel_handle_done (void *data, struct zwlr_foreign_toplevel_handle_v1 *toplevel) { - // ignore + /* ignore */ } static void diff --git a/applets/wncklet/wayland-backend.h b/applets/wncklet/wayland-backend.h index d3ce93da..0ea4634a 100644 --- a/applets/wncklet/wayland-backend.h +++ b/applets/wncklet/wayland-backend.h @@ -22,7 +22,7 @@ #ifndef _WNCKLET_APPLET_WAYLAND_BACKEND_H_ #define _WNCKLET_APPLET_WAYLAND_BACKEND_H_ -#ifdef PACKAGE_NAME // only check HAVE_WAYLAND if config.h has been included +#ifdef PACKAGE_NAME /* only check HAVE_WAYLAND if config.h has been included */ #ifndef HAVE_WAYLAND #error file should only be included when HAVE_WAYLAND is enabled #endif @@ -43,6 +43,6 @@ void wayland_tasklist_set_orientation (GtkWidget* tasklist_widget, GtkOrientatio } #endif -#endif // _WNCKLET_APPLET_WAYLAND_BACKEND_H_ +#endif /* _WNCKLET_APPLET_WAYLAND_BACKEND_H_ */ diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c index 5c336259..a4b9b9ea 100644 --- a/applets/wncklet/window-list.c +++ b/applets/wncklet/window-list.c @@ -23,12 +23,12 @@ #include #define WNCK_I_KNOW_THIS_IS_UNSTABLE #include -#endif // HAVE_X11 +#endif /* HAVE_X11 */ #ifdef HAVE_WAYLAND #include #include "wayland-backend.h" -#endif // HAVE_WAYLAND +#endif /* HAVE_WAYLAND */ #define MATE_DESKTOP_USE_UNSTABLE_API #include @@ -41,7 +41,7 @@ #ifdef HAVE_WINDOW_PREVIEWS #define WINDOW_LIST_PREVIEW_SCHEMA "org.mate.panel.applet.window-list-previews" -#endif // HAVE_WINDOW_PREVIEWS +#endif /* HAVE_WINDOW_PREVIEWS */ typedef enum { TASKLIST_NEVER_GROUP, @@ -125,9 +125,9 @@ static void tasklist_update(TasklistData* tasklist) wnck_tasklist_set_include_all_workspaces(WNCK_TASKLIST(tasklist->tasklist), tasklist->include_all_workspaces); wnck_tasklist_set_switch_workspace_on_unminimize(WNCK_TASKLIST(tasklist->tasklist), tasklist->move_unminimized_windows); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ - // Not implemented for Wayland + /* Not implemented for Wayland */ } static void tasklist_apply_orientation(TasklistData* tasklist) @@ -137,7 +137,7 @@ static void tasklist_apply_orientation(TasklistData* tasklist) { wnck_tasklist_set_orientation(WNCK_TASKLIST(tasklist->tasklist), tasklist->orientation); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ #ifdef HAVE_WAYLAND if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default())) @@ -154,9 +154,9 @@ static void tasklist_set_button_relief(TasklistData* tasklist, GtkReliefStyle re { wnck_tasklist_set_button_relief(WNCK_TASKLIST(tasklist->tasklist), relief); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ - // Not implemented for Wayland + /* Not implemented for Wayland */ } static const int* tasklist_get_size_hint_list(TasklistData* tasklist, int* n_elements) @@ -167,10 +167,10 @@ static const int* tasklist_get_size_hint_list(TasklistData* tasklist, int* n_ele return wnck_tasklist_get_size_hint_list(WNCK_TASKLIST(tasklist->tasklist), n_elements); } else -#endif // HAVE_X11 +#endif /* HAVE_X11 */ { - // Not implemented for Wayland + /* Not implemented for Wayland */ *n_elements = 0; return NULL; } @@ -400,8 +400,8 @@ static gboolean applet_leave_notify_event (WnckTasklist *tl, GList *wnck_windows return FALSE; } -#endif // HAVE_WINDOW_PREVIEWS -#endif // HAVE_X11 +#endif /* HAVE_WINDOW_PREVIEWS */ +#endif /* HAVE_X11 */ static void applet_change_pixel_size(MatePanelApplet* applet, gint size, TasklistData* tasklist) { @@ -639,7 +639,7 @@ static void applet_size_allocate(GtkWidget *widget, GtkAllocation *allocation, T } #ifdef HAVE_X11 -// Currently only used on X11, but should work on Wayland as well when needed +/* Currently only used on X11, but should work on Wayland as well when needed */ static GdkPixbuf* icon_loader_func(const char* icon, int size, unsigned int flags, void* data) { TasklistData* tasklist; @@ -685,7 +685,7 @@ static GdkPixbuf* icon_loader_func(const char* icon, int size, unsigned int flag return retval; } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ gboolean window_list_applet_fill(MatePanelApplet* applet) { @@ -757,10 +757,10 @@ gboolean window_list_applet_fill(MatePanelApplet* applet) #ifdef HAVE_WINDOW_PREVIEWS g_signal_connect(G_OBJECT(tasklist->tasklist), "task_enter_notify", G_CALLBACK(applet_enter_notify_event), tasklist); g_signal_connect(G_OBJECT(tasklist->tasklist), "task_leave_notify", G_CALLBACK(applet_leave_notify_event), tasklist); -#endif // HAVE_WINDOW_PREVIEWS +#endif /* HAVE_WINDOW_PREVIEWS */ } else -#endif // HAVE_X11 +#endif /* HAVE_X11 */ #ifdef HAVE_WAYLAND if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ())) @@ -768,7 +768,7 @@ gboolean window_list_applet_fill(MatePanelApplet* applet) tasklist->tasklist = wayland_tasklist_new(); } else -#endif // HAVE_WAYLAND +#endif /* HAVE_WAYLAND */ { tasklist->tasklist = gtk_label_new ("[Tasklist not supported on this platform]"); @@ -960,7 +960,7 @@ static void setup_dialog(GtkBuilder* builder, TasklistData* tasklist) GtkWidget* button; #ifdef HAVE_WINDOW_PREVIEWS GtkAdjustment *adjustment; -#endif // HAVE_WINDOW_PREVIEWS +#endif /* HAVE_WINDOW_PREVIEWS */ tasklist->show_current_radio = WID("show_current_radio"); tasklist->show_all_radio = WID("show_all_radio"); diff --git a/applets/wncklet/window-menu.c b/applets/wncklet/window-menu.c index c751a161..48b1c31b 100644 --- a/applets/wncklet/window-menu.c +++ b/applets/wncklet/window-menu.c @@ -39,11 +39,11 @@ #include #define WNCK_I_KNOW_THIS_IS_UNSTABLE #include -#endif // HAVE_X11 +#endif /* HAVE_X11 */ #ifdef HAVE_WAYLAND #include -#endif // HAVE_WAYLAND +#endif /* HAVE_WAYLAND */ #include "wncklet.h" #include "window-menu.h" @@ -257,7 +257,7 @@ gboolean window_menu_applet_fill(MatePanelApplet* applet) } else -#endif // HAVE_X11 +#endif /* HAVE_X11 */ #ifdef HAVE_WAYLAND if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ())) @@ -265,7 +265,7 @@ gboolean window_menu_applet_fill(MatePanelApplet* applet) window_menu->selector = gtk_label_new ("[Window menu not supported on Wayland]"); } else -#endif // HAVE_WAYLAND +#endif /* HAVE_WAYLAND */ { window_menu->selector = gtk_label_new ("[Window menu not supported on this platform]"); diff --git a/applets/wncklet/wncklet.c b/applets/wncklet/wncklet.c index ed141b1f..67b2ae78 100644 --- a/applets/wncklet/wncklet.c +++ b/applets/wncklet/wncklet.c @@ -109,7 +109,7 @@ WnckScreen* wncklet_get_screen(GtkWidget* applet) return wnck_screen_get(screen_num); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ void wncklet_connect_while_alive(gpointer object, const char* signal, GCallback func, gpointer func_data, gpointer alive_object) { @@ -134,7 +134,7 @@ static gboolean wncklet_factory(MatePanelApplet* applet, const char* iid, gpoint type_registered = TRUE; } } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ if (!strcmp(iid, "WindowMenuApplet")) retval = window_menu_applet_fill(applet); diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c index 240145d9..2335bb1d 100644 --- a/applets/wncklet/workspace-switcher.c +++ b/applets/wncklet/workspace-switcher.c @@ -27,11 +27,11 @@ #include #define WNCK_I_KNOW_THIS_IS_UNSTABLE #include -#endif // HAVE_X11 +#endif /* HAVE_X11 */ #ifdef HAVE_WAYLAND #include -#endif // HAVE_WAYLAND +#endif /* HAVE_WAYLAND */ #include @@ -117,7 +117,7 @@ static void pager_update_wnck(PagerData* pager, WnckPager* wnck_pager) wnck_pager_set_show_all(wnck_pager, pager->display_all); wnck_pager_set_display_mode(wnck_pager, display_mode); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ static void pager_update(PagerData* pager) { @@ -126,7 +126,7 @@ static void pager_update(PagerData* pager) { pager_update_wnck(pager, WNCK_PAGER(pager->pager)); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ } static void update_properties_for_wm(PagerData* pager) @@ -207,7 +207,7 @@ static void window_manager_changed(WnckScreen* screen, PagerData* pager) { wm_name = wnck_screen_get_window_manager_name (pager->screen); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ if (!wm_name) pager->wm = PAGER_WM_UNKNOWN; @@ -234,7 +234,7 @@ static void applet_realized(MatePanelApplet* applet, PagerData* pager) pager->screen = wncklet_get_screen(GTK_WIDGET(applet)); wncklet_connect_while_alive(pager->screen, "window_manager_changed", G_CALLBACK(window_manager_changed), pager, pager->applet); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ window_manager_changed(pager->screen, pager); } @@ -243,7 +243,7 @@ static void applet_unrealized(MatePanelApplet* applet, PagerData* pager) { #ifdef HAVE_X11 pager->screen = NULL; -#endif // HAVE_X11 +#endif /* HAVE_X11 */ pager->wm = PAGER_WM_UNKNOWN; } @@ -288,7 +288,7 @@ static void applet_change_background(MatePanelApplet* applet, MatePanelAppletBac wnck_pager_set_shadow_type (WNCK_PAGER (pager->pager), type == PANEL_NO_BACKGROUND ? GTK_SHADOW_NONE : GTK_SHADOW_IN); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ } static void applet_style_updated (MatePanelApplet *applet, GtkStyleContext *context) @@ -340,7 +340,7 @@ static gboolean applet_scroll(MatePanelApplet* applet, GdkEventScroll* event, Pa n_workspaces = wnck_screen_get_workspace_count(pager->screen); } else -#endif // HAVE_X11 +#endif /* HAVE_X11 */ { index = 0; n_workspaces = 1; @@ -436,7 +436,7 @@ static gboolean applet_scroll(MatePanelApplet* applet, GdkEventScroll* event, Pa { wnck_workspace_activate(wnck_screen_get_workspace(pager->screen, index), event->time); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ return TRUE; } @@ -608,7 +608,7 @@ gboolean workspace_switcher_applet_fill(MatePanelApplet* applet) wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_IN); } else -#endif // HAVE_X11 +#endif /* HAVE_X11 */ #ifdef HAVE_WAYLAND if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ())) @@ -616,7 +616,7 @@ gboolean workspace_switcher_applet_fill(MatePanelApplet* applet) pager->pager = gtk_label_new ("[Pager not supported on Wayland]"); } else -#endif // HAVE_WAYLAND +#endif /* HAVE_WAYLAND */ { pager->pager = gtk_label_new ("[Pager not supported on this platform]"); @@ -735,9 +735,9 @@ static const char *get_workspace_name(PagerData* pager, int workspace_index) WnckWorkspace *workspace = wnck_screen_get_workspace(pager->screen, workspace_index); return wnck_workspace_get_name(workspace); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ - // Fallback + /* Fallback */ return "workspace"; } @@ -748,7 +748,7 @@ static void update_workspaces_model(PagerData* pager) #ifdef HAVE_X11 if (pager->screen) nr_ws = wnck_screen_get_workspace_count (pager->screen); -#endif // HAVE_X11 +#endif /* HAVE_X11 */ if (pager->properties_dialog) { @@ -794,7 +794,7 @@ static void workspace_destroyed(WnckScreen* screen, WnckWorkspace* space, PagerD g_return_if_fail(WNCK_IS_SCREEN(screen)); update_workspaces_model(pager); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ static void num_workspaces_value_changed(GtkSpinButton* button, PagerData* pager) { @@ -804,7 +804,7 @@ static void num_workspaces_value_changed(GtkSpinButton* button, PagerData* pager int workspace_count = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(pager->num_workspaces_spin)); wnck_screen_change_workspace_count(pager->screen, workspace_count); } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ } static gboolean workspaces_tree_focused_out(GtkTreeView* treeview, GdkEventFocus* event, PagerData* pager) @@ -1041,7 +1041,7 @@ static void setup_dialog(GtkBuilder* builder, PagerData* pager) wncklet_connect_while_alive(G_OBJECT(wnck_screen_get_workspace(pager->screen, i)), "name_changed", G_CALLBACK(workspace_renamed), pager, pager->properties_dialog); } } -#endif // HAVE_X11 +#endif /* HAVE_X11 */ g_signal_connect(G_OBJECT(pager->num_workspaces_spin), "value_changed", (GCallback) num_workspaces_value_changed, pager); -- cgit v1.2.1