Don't indent top-level comments
This commit is contained in:
parent
7e58e5c64c
commit
8cadd8f905
10
menu.c
10
menu.c
@ -47,7 +47,7 @@ void regex_teardown(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Exctract all urls from a given string.
|
* Exctract all urls from a given string.
|
||||||
*
|
*
|
||||||
* Return: a string of urls separated by \n
|
* Return: a string of urls separated by \n
|
||||||
@ -87,7 +87,7 @@ char *extract_urls(const char *to_match)
|
|||||||
return urls;
|
return urls;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Open url in browser.
|
* Open url in browser.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -111,7 +111,7 @@ void open_browser(const char *url)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Notify the corresponding client
|
* Notify the corresponding client
|
||||||
* that an action has been invoked
|
* that an action has been invoked
|
||||||
*/
|
*/
|
||||||
@ -153,7 +153,7 @@ void invoke_action(const char *action)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dispatch whatever has been returned
|
* Dispatch whatever has been returned
|
||||||
* by the menu.
|
* by the menu.
|
||||||
*/
|
*/
|
||||||
@ -182,7 +182,7 @@ void dispatch_menu_result(const char *input)
|
|||||||
free(in);
|
free(in);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Open the context menu that let's the user
|
* Open the context menu that let's the user
|
||||||
* select urls/actions/etc
|
* select urls/actions/etc
|
||||||
*/
|
*/
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
int next_notification_id = 1;
|
int next_notification_id = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* print a human readable representation
|
* print a human readable representation
|
||||||
* of the given notification to stdout.
|
* of the given notification to stdout.
|
||||||
*/
|
*/
|
||||||
@ -60,7 +60,7 @@ void notification_print(notification * n)
|
|||||||
printf("}\n");
|
printf("}\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Run the script associated with the
|
* Run the script associated with the
|
||||||
* given notification.
|
* given notification.
|
||||||
*/
|
*/
|
||||||
@ -115,7 +115,7 @@ void notification_run_script(notification * n)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper function to compare to given
|
* Helper function to compare to given
|
||||||
* notifications.
|
* notifications.
|
||||||
*/
|
*/
|
||||||
@ -134,7 +134,7 @@ int notification_cmp(const void *va, const void *vb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wrapper for notification_cmp to match glib's
|
* Wrapper for notification_cmp to match glib's
|
||||||
* compare functions signature.
|
* compare functions signature.
|
||||||
*/
|
*/
|
||||||
@ -143,7 +143,7 @@ int notification_cmp_data(const void *va, const void *vb, void *data)
|
|||||||
return notification_cmp(va, vb);
|
return notification_cmp(va, vb);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Free the memory used by the given notification.
|
* Free the memory used by the given notification.
|
||||||
*/
|
*/
|
||||||
void notification_free(notification * n)
|
void notification_free(notification * n)
|
||||||
@ -180,7 +180,7 @@ void notification_free(notification * n)
|
|||||||
free(n);
|
free(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Strip any markup from text
|
* Strip any markup from text
|
||||||
*/
|
*/
|
||||||
char *notification_strip_markup(char *str)
|
char *notification_strip_markup(char *str)
|
||||||
@ -202,7 +202,7 @@ char *notification_strip_markup(char *str)
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Quote a text string for rendering with pango
|
* Quote a text string for rendering with pango
|
||||||
*/
|
*/
|
||||||
char *notification_quote_markup(char *str)
|
char *notification_quote_markup(char *str)
|
||||||
@ -220,7 +220,7 @@ char *notification_quote_markup(char *str)
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Replace all occurrences of "needle" with a quoted "replacement",
|
* Replace all occurrences of "needle" with a quoted "replacement",
|
||||||
* according to the allow_markup/plain_text settings.
|
* according to the allow_markup/plain_text settings.
|
||||||
*/
|
*/
|
||||||
@ -302,7 +302,7 @@ char *notification_extract_markup_urls(char **str_ptr) {
|
|||||||
return urls;
|
return urls;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the given notification and add it to
|
* Initialize the given notification and add it to
|
||||||
* the queue. Replace notification with id if id > 0.
|
* the queue. Replace notification with id if id > 0.
|
||||||
*/
|
*/
|
||||||
@ -501,7 +501,7 @@ int notification_init(notification * n, int id)
|
|||||||
return n->id;
|
return n->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close the notification that has id.
|
* Close the notification that has id.
|
||||||
*
|
*
|
||||||
* reasons:
|
* reasons:
|
||||||
@ -544,7 +544,7 @@ int notification_close_by_id(int id, int reason)
|
|||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close the given notification. SEE notification_close_by_id.
|
* Close the given notification. SEE notification_close_by_id.
|
||||||
*/
|
*/
|
||||||
int notification_close(notification * n, int reason)
|
int notification_close(notification * n, int reason)
|
||||||
|
40
x.c
40
x.c
@ -713,7 +713,7 @@ static void setopacity(Window win, unsigned long opacity)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the modifier which is NumLock.
|
* Returns the modifier which is NumLock.
|
||||||
*/
|
*/
|
||||||
static KeySym x_numlock_mod()
|
static KeySym x_numlock_mod()
|
||||||
@ -766,7 +766,7 @@ end:
|
|||||||
return sym;
|
return sym;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper function to use glib's mainloop mechanic
|
* Helper function to use glib's mainloop mechanic
|
||||||
* with Xlib
|
* with Xlib
|
||||||
*/
|
*/
|
||||||
@ -779,7 +779,7 @@ gboolean x_mainloop_fd_prepare(GSource * source, gint * timeout)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper function to use glib's mainloop mechanic
|
* Helper function to use glib's mainloop mechanic
|
||||||
* with Xlib
|
* with Xlib
|
||||||
*/
|
*/
|
||||||
@ -788,7 +788,7 @@ gboolean x_mainloop_fd_check(GSource * source)
|
|||||||
return XPending(xctx.dpy) > 0;
|
return XPending(xctx.dpy) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main Dispatcher for XEvents
|
* Main Dispatcher for XEvents
|
||||||
*/
|
*/
|
||||||
gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback,
|
gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback,
|
||||||
@ -854,7 +854,7 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check whether the user is currently idle.
|
* Check whether the user is currently idle.
|
||||||
*/
|
*/
|
||||||
bool x_is_idle(void)
|
bool x_is_idle(void)
|
||||||
@ -868,7 +868,7 @@ bool x_is_idle(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* TODO move to x_mainloop_* */
|
/* TODO move to x_mainloop_* */
|
||||||
/*
|
/*
|
||||||
* Handle incoming mouse click events
|
* Handle incoming mouse click events
|
||||||
*/
|
*/
|
||||||
static void x_handle_click(XEvent ev)
|
static void x_handle_click(XEvent ev)
|
||||||
@ -898,7 +898,7 @@ static void x_handle_click(XEvent ev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the window that currently has
|
* Return the window that currently has
|
||||||
* the keyboard focus.
|
* the keyboard focus.
|
||||||
*/
|
*/
|
||||||
@ -925,7 +925,7 @@ static Window get_focused_window(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
/*
|
/*
|
||||||
* Select the screen on which the Window
|
* Select the screen on which the Window
|
||||||
* should be displayed.
|
* should be displayed.
|
||||||
*/
|
*/
|
||||||
@ -991,7 +991,7 @@ sc_cleanup:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update the information about the monitor
|
* Update the information about the monitor
|
||||||
* geometry.
|
* geometry.
|
||||||
*/
|
*/
|
||||||
@ -1037,7 +1037,7 @@ void x_free(void)
|
|||||||
XCloseDisplay(xctx.dpy);
|
XCloseDisplay(xctx.dpy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup X11 stuff
|
* Setup X11 stuff
|
||||||
*/
|
*/
|
||||||
void x_setup(void)
|
void x_setup(void)
|
||||||
@ -1147,7 +1147,7 @@ static void x_set_wm(Window win)
|
|||||||
PropModeReplace, (unsigned char *) data, 1L);
|
PropModeReplace, (unsigned char *) data, 1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup the window
|
* Setup the window
|
||||||
*/
|
*/
|
||||||
static void x_win_setup(void)
|
static void x_win_setup(void)
|
||||||
@ -1193,7 +1193,7 @@ static void x_win_setup(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show the window and grab shortcuts.
|
* Show the window and grab shortcuts.
|
||||||
*/
|
*/
|
||||||
void x_win_show(void)
|
void x_win_show(void)
|
||||||
@ -1218,7 +1218,7 @@ void x_win_show(void)
|
|||||||
xctx.visible = true;
|
xctx.visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hide the window and ungrab unused keyboard_shortcuts
|
* Hide the window and ungrab unused keyboard_shortcuts
|
||||||
*/
|
*/
|
||||||
void x_win_hide()
|
void x_win_hide()
|
||||||
@ -1233,7 +1233,7 @@ void x_win_hide()
|
|||||||
xctx.visible = false;
|
xctx.visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse a string into a modifier mask.
|
* Parse a string into a modifier mask.
|
||||||
*/
|
*/
|
||||||
KeySym x_shortcut_string_to_mask(const char *str)
|
KeySym x_shortcut_string_to_mask(const char *str)
|
||||||
@ -1257,7 +1257,7 @@ KeySym x_shortcut_string_to_mask(const char *str)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Error handler for grabbing mouse and keyboard errors.
|
* Error handler for grabbing mouse and keyboard errors.
|
||||||
*/
|
*/
|
||||||
static int GrabXErrorHandler(Display * display, XErrorEvent * e)
|
static int GrabXErrorHandler(Display * display, XErrorEvent * e)
|
||||||
@ -1286,7 +1286,7 @@ static int FollowXErrorHandler(Display * display, XErrorEvent * e)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup the Error handler.
|
* Setup the Error handler.
|
||||||
*/
|
*/
|
||||||
static void x_shortcut_setup_error_handler(void)
|
static void x_shortcut_setup_error_handler(void)
|
||||||
@ -1305,7 +1305,7 @@ static void x_follow_setup_error_handler(void)
|
|||||||
XSetErrorHandler(FollowXErrorHandler);
|
XSetErrorHandler(FollowXErrorHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tear down the Error handler.
|
* Tear down the Error handler.
|
||||||
*/
|
*/
|
||||||
static int x_shortcut_tear_down_error_handler(void)
|
static int x_shortcut_tear_down_error_handler(void)
|
||||||
@ -1324,7 +1324,7 @@ static int x_follow_tear_down_error_handler(void)
|
|||||||
return dunst_follow_errored;
|
return dunst_follow_errored;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Grab the given keyboard shortcut.
|
* Grab the given keyboard shortcut.
|
||||||
*/
|
*/
|
||||||
int x_shortcut_grab(keyboard_shortcut * ks)
|
int x_shortcut_grab(keyboard_shortcut * ks)
|
||||||
@ -1351,7 +1351,7 @@ int x_shortcut_grab(keyboard_shortcut * ks)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ungrab the given keyboard shortcut.
|
* Ungrab the given keyboard shortcut.
|
||||||
*/
|
*/
|
||||||
void x_shortcut_ungrab(keyboard_shortcut * ks)
|
void x_shortcut_ungrab(keyboard_shortcut * ks)
|
||||||
@ -1364,7 +1364,7 @@ void x_shortcut_ungrab(keyboard_shortcut * ks)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the keyboard shortcut.
|
* Initialize the keyboard shortcut.
|
||||||
*/
|
*/
|
||||||
void x_shortcut_init(keyboard_shortcut * ks)
|
void x_shortcut_init(keyboard_shortcut * ks)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user