wmcliphist: Remove trailing whitespace.
This commit is contained in:
parent
a134f7433b
commit
42f9f9a70f
|
@ -4,7 +4,7 @@ INCLUDES = `pkg-config --cflags gtk+-2.0 x11`
|
||||||
|
|
||||||
# for normal use
|
# for normal use
|
||||||
CFLAGS += -Wall -ansi -pedantic $(INCLUDES)
|
CFLAGS += -Wall -ansi -pedantic $(INCLUDES)
|
||||||
DEBUG =
|
DEBUG =
|
||||||
|
|
||||||
# for debuggind purposes
|
# for debuggind purposes
|
||||||
# ISO doesn't support macros with variable number of arguments so -pedantic
|
# ISO doesn't support macros with variable number of arguments so -pedantic
|
||||||
|
|
|
@ -32,7 +32,7 @@ dump_history_list_fn(char *header)
|
||||||
GList *node = history_items;
|
GList *node = history_items;
|
||||||
HISTORY_ITEM *data;
|
HISTORY_ITEM *data;
|
||||||
gchar *converted;
|
gchar *converted;
|
||||||
|
|
||||||
fprintf(stderr, "%s\n", header);
|
fprintf(stderr, "%s\n", header);
|
||||||
while (node) {
|
while (node) {
|
||||||
data = (HISTORY_ITEM *)node->data;
|
data = (HISTORY_ITEM *)node->data;
|
||||||
|
@ -62,7 +62,7 @@ my_get_selection_text(GtkClipboard *clipboard, const gchar *text, gpointer
|
||||||
if (text == NULL) {
|
if (text == NULL) {
|
||||||
return_void();
|
return_void();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_utf8_collate(text, old_content) != 0 &&
|
if (g_utf8_collate(text, old_content) != 0 &&
|
||||||
!GTK_CHECK_MENU_ITEM(menu_app_clip_ignore)->active) {
|
!GTK_CHECK_MENU_ITEM(menu_app_clip_ignore)->active) {
|
||||||
/* new data in clipboard */
|
/* new data in clipboard */
|
||||||
|
@ -117,7 +117,7 @@ my_get_xselection(GtkWidget *window, GdkEvent *event)
|
||||||
my_get_selection_text, NULL);
|
my_get_selection_text, NULL);
|
||||||
|
|
||||||
return_val(TRUE);
|
return_val(TRUE);
|
||||||
|
|
||||||
length = (size_t) gdk_selection_property_get(window->window,
|
length = (size_t) gdk_selection_property_get(window->window,
|
||||||
(guchar **) &content, &atom, &format);
|
(guchar **) &content, &atom, &format);
|
||||||
|
|
||||||
|
@ -174,20 +174,20 @@ time_conv_select()
|
||||||
* handles request for selection from other apps
|
* handles request for selection from other apps
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
selection_handle(GtkWidget *widget,
|
selection_handle(GtkWidget *widget,
|
||||||
GtkSelectionData *selection_data,
|
GtkSelectionData *selection_data,
|
||||||
guint info,
|
guint info,
|
||||||
guint time_stamp,
|
guint time_stamp,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
static gchar *converted = NULL;
|
static gchar *converted = NULL;
|
||||||
|
|
||||||
begin_func("selection_handle");
|
begin_func("selection_handle");
|
||||||
|
|
||||||
if (converted != NULL) {
|
if (converted != NULL) {
|
||||||
g_free(converted);
|
g_free(converted);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected) {
|
if (selected) {
|
||||||
converted = from_utf8(selected->content);
|
converted = from_utf8(selected->content);
|
||||||
gtk_selection_data_set(selection_data,
|
gtk_selection_data_set(selection_data,
|
||||||
|
|
|
@ -37,7 +37,7 @@ debug_init_threads()
|
||||||
int *new_align;
|
int *new_align;
|
||||||
|
|
||||||
memset(tabs, 9, 1024);
|
memset(tabs, 9, 1024);
|
||||||
|
|
||||||
if (!(new_align = malloc(sizeof(int))))
|
if (!(new_align = malloc(sizeof(int))))
|
||||||
abort();
|
abort();
|
||||||
*new_align = 1;
|
*new_align = 1;
|
||||||
|
@ -77,7 +77,7 @@ fn_begin(char *format, ...)
|
||||||
#else
|
#else
|
||||||
align = &main_align;
|
align = &main_align;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
vsprintf(msg_buf, format, args);
|
vsprintf(msg_buf, format, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
@ -124,7 +124,7 @@ fn1()
|
||||||
fn2(1);
|
fn2(1);
|
||||||
return_val(0);
|
return_val(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
|
|
@ -133,7 +133,7 @@ such a program is covered only if its contents constitute a work based
|
||||||
on the Library (independent of the use of the Library in a tool for
|
on the Library (independent of the use of the Library in a tool for
|
||||||
writing it). Whether that is true depends on what the Library does
|
writing it). Whether that is true depends on what the Library does
|
||||||
and what the program that uses the Library does.
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
complete source code as you receive it, in any medium, provided that
|
complete source code as you receive it, in any medium, provided that
|
||||||
you conspicuously and appropriately publish on each copy an
|
you conspicuously and appropriately publish on each copy an
|
||||||
|
|
|
@ -40,7 +40,7 @@ Comments:
|
||||||
see this window on the screen; it will be hidden. The only purpose of this
|
see this window on the screen; it will be hidden. The only purpose of this
|
||||||
window is to provide window group.
|
window is to provide window group.
|
||||||
(3) Because we will do some Xlib lowlevel tricks in
|
(3) Because we will do some Xlib lowlevel tricks in
|
||||||
foo_create_main_icon_window, main window should be realized or
|
foo_create_main_icon_window, main window should be realized or
|
||||||
GDK_WINDOW_XWINDOW(w->window) will fail.
|
GDK_WINDOW_XWINDOW(w->window) will fail.
|
||||||
(4) w1 now is pointer to gtk event box. You may think about w1 as about
|
(4) w1 now is pointer to gtk event box. You may think about w1 as about
|
||||||
GTK_CONTAINER which represent docked WindowMaker application. You can put
|
GTK_CONTAINER which represent docked WindowMaker application. You can put
|
||||||
|
@ -61,7 +61,7 @@ ACKNOWLEDGEMENTS:
|
||||||
|
|
||||||
I should thank:
|
I should thank:
|
||||||
|
|
||||||
1. Owen Taylor <otaylor@redhat.com>, one of Gtk authors. He answered my request
|
1. Owen Taylor <otaylor@redhat.com>, one of Gtk authors. He answered my request
|
||||||
in Gtk mailing list: "Use the function: void gdk_window_set_icon". It allows
|
in Gtk mailing list: "Use the function: void gdk_window_set_icon". It allows
|
||||||
to understand me that there is no way to do dockable application in Gdk/Gtk
|
to understand me that there is no way to do dockable application in Gdk/Gtk
|
||||||
w/o Xlib (because gdk_window_set_icon doesn't help, and Gtk author didn't
|
w/o Xlib (because gdk_window_set_icon doesn't help, and Gtk author didn't
|
||||||
|
|
|
@ -17,12 +17,12 @@ int main( int argc, char *argv[] ) {
|
||||||
GtkWidget *gtkiw;
|
GtkWidget *gtkiw;
|
||||||
GtkWidget *box;
|
GtkWidget *box;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
|
||||||
gtk_init(&argc, &argv);
|
gtk_init(&argc, &argv);
|
||||||
|
|
||||||
gtkiw = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
gtkiw = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_widget_realize(gtkiw);
|
gtk_widget_realize(gtkiw);
|
||||||
|
|
||||||
box = foo_create_main_icon_window(gtkiw, 56, argc, argv);
|
box = foo_create_main_icon_window(gtkiw, 56, argc, argv);
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("FOO");
|
button = gtk_button_new_with_label ("FOO");
|
||||||
|
@ -34,6 +34,6 @@ int main( int argc, char *argv[] ) {
|
||||||
gtk_widget_show(gtkiw);
|
gtk_widget_show(gtkiw);
|
||||||
|
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* File: foodock.c
|
* File: foodock.c
|
||||||
*
|
*
|
||||||
* Created: Fri Jan 14 01:15:24 2000
|
* Created: Fri Jan 14 01:15:24 2000
|
||||||
*
|
*
|
||||||
* (c) 2000, Alexey Vyskubov <alexey@pepper.spb.ru>
|
* (c) 2000, Alexey Vyskubov <alexey@pepper.spb.ru>
|
||||||
*
|
*
|
||||||
* LGPL, see file LICENSE
|
* LGPL, see file LICENSE
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
* icon window as well as main window before gtk_main().
|
* icon window as well as main window before gtk_main().
|
||||||
*
|
*
|
||||||
* Call foo_set_wmhints() after both windows are shown (gtk_widget_show()).
|
* Call foo_set_wmhints() after both windows are shown (gtk_widget_show()).
|
||||||
*
|
*
|
||||||
* Input:
|
* Input:
|
||||||
* mw Pointer to main window
|
* mw Pointer to main window
|
||||||
* s icon window size (56 is recommended)
|
* s icon window size (56 is recommended)
|
||||||
|
@ -48,7 +48,7 @@ GtkWidget *foo_create_main_icon_window(GtkWidget *mw,
|
||||||
/*
|
/*
|
||||||
* Set WMHints on the dockapp (icon) window. Needs to be called after
|
* Set WMHints on the dockapp (icon) window. Needs to be called after
|
||||||
* the main window is shown, due to changes in GTK+ 2.4.
|
* the main window is shown, due to changes in GTK+ 2.4.
|
||||||
*
|
*
|
||||||
* Input:
|
* Input:
|
||||||
* mw Pointer to main window
|
* mw Pointer to main window
|
||||||
* dw Pointer to icon (dockapp) window
|
* dw Pointer to icon (dockapp) window
|
||||||
|
@ -63,13 +63,13 @@ void foo_set_wmhints(GtkWidget *mw,
|
||||||
|
|
||||||
xmw = GDK_WINDOW_XWINDOW(mw->window);
|
xmw = GDK_WINDOW_XWINDOW(mw->window);
|
||||||
|
|
||||||
|
|
||||||
/* Time for game with Xlib */
|
/* Time for game with Xlib */
|
||||||
wm_hints = XAllocWMHints();
|
wm_hints = XAllocWMHints();
|
||||||
wm_hints->window_group = xmw;
|
wm_hints->window_group = xmw;
|
||||||
wm_hints->icon_window = GDK_WINDOW_XWINDOW(dw->window);
|
wm_hints->icon_window = GDK_WINDOW_XWINDOW(dw->window);
|
||||||
wm_hints->icon_x = 0;
|
wm_hints->icon_x = 0;
|
||||||
wm_hints->icon_y = 0;
|
wm_hints->icon_y = 0;
|
||||||
wm_hints->initial_state = WithdrawnState;
|
wm_hints->initial_state = WithdrawnState;
|
||||||
wm_hints->flags = StateHint |
|
wm_hints->flags = StateHint |
|
||||||
IconPositionHint |
|
IconPositionHint |
|
||||||
|
@ -80,6 +80,6 @@ void foo_set_wmhints(GtkWidget *mw,
|
||||||
XSetWMHints(GDK_DISPLAY(), xmw, wm_hints);
|
XSetWMHints(GDK_DISPLAY(), xmw, wm_hints);
|
||||||
|
|
||||||
XSetCommand(GDK_DISPLAY(), xmw, margv, margc);
|
XSetCommand(GDK_DISPLAY(), xmw, margv, margc);
|
||||||
|
|
||||||
XFree(wm_hints);
|
XFree(wm_hints);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
* File: foodock.h
|
* File: foodock.h
|
||||||
*
|
*
|
||||||
* Created: Fri Jan 14 01:14:25 2000
|
* Created: Fri Jan 14 01:14:25 2000
|
||||||
*
|
*
|
||||||
* (c) 2000, Alexey Vyskubov <alexey@pepper.spb.ru>
|
* (c) 2000, Alexey Vyskubov <alexey@pepper.spb.ru>
|
||||||
*
|
*
|
||||||
* LGPL, see file LICENSE
|
* LGPL, see file LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* icon window as well as main window before gtk_main().
|
* icon window as well as main window before gtk_main().
|
||||||
*
|
*
|
||||||
* Call foo_set_wmhints() after both windows are shown (gtk_widget_show()).
|
* Call foo_set_wmhints() after both windows are shown (gtk_widget_show()).
|
||||||
*
|
*
|
||||||
* Input:
|
* Input:
|
||||||
* mw Pointer to main window
|
* mw Pointer to main window
|
||||||
* s icon window size (56 is recommended)
|
* s icon window size (56 is recommended)
|
||||||
|
@ -31,7 +31,7 @@ GtkWidget *foo_create_main_icon_window(GtkWidget *main_window,
|
||||||
/*
|
/*
|
||||||
* Set WMHints on the dockapp (icon) window. Needs to be called after
|
* Set WMHints on the dockapp (icon) window. Needs to be called after
|
||||||
* the main window is shown, due to changes in GTK+ 2.4.
|
* the main window is shown, due to changes in GTK+ 2.4.
|
||||||
*
|
*
|
||||||
* Input:
|
* Input:
|
||||||
* mw Pointer to main window
|
* mw Pointer to main window
|
||||||
* dw Pointer to icon (dockapp) window
|
* dw Pointer to icon (dockapp) window
|
||||||
|
|
|
@ -55,7 +55,7 @@ menu_item_button_released(GtkWidget *widget,
|
||||||
HISTORY_ITEM *data = user_data;
|
HISTORY_ITEM *data = user_data;
|
||||||
|
|
||||||
begin_func("menu_item_button_released");
|
begin_func("menu_item_button_released");
|
||||||
|
|
||||||
/* button 2 or 3 - exec or (un)lock item respectively */
|
/* button 2 or 3 - exec or (un)lock item respectively */
|
||||||
if (bevent->button == 2) {
|
if (bevent->button == 2) {
|
||||||
if (exec_middleclick) {
|
if (exec_middleclick) {
|
||||||
|
@ -132,7 +132,7 @@ menu_item_exists(gchar *content, GtkWidget *submenu)
|
||||||
}
|
}
|
||||||
list_node = g_list_previous(list_node);
|
list_node = g_list_previous(list_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
return_val(NULL);
|
return_val(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ menu_item_add(gchar *content, gint locked, GtkWidget *target_menu)
|
||||||
HISTORY_ITEM *hist_item;
|
HISTORY_ITEM *hist_item;
|
||||||
|
|
||||||
begin_func("menu_item_add");
|
begin_func("menu_item_add");
|
||||||
|
|
||||||
hist_item = menu_item_exists(content, target_menu);
|
hist_item = menu_item_exists(content, target_menu);
|
||||||
if (hist_item != NULL) {
|
if (hist_item != NULL) {
|
||||||
dump_history_list("reorder");
|
dump_history_list("reorder");
|
||||||
|
@ -180,7 +180,7 @@ menu_item_add(gchar *content, gint locked, GtkWidget *target_menu)
|
||||||
num_items--;
|
num_items--;
|
||||||
dump_history_list("remove oldest");
|
dump_history_list("remove oldest");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepare menu item name */
|
/* prepare menu item name */
|
||||||
menu_item_name = g_new0(char, MAX_ITEM_LENGTH * 2 + 1);
|
menu_item_name = g_new0(char, MAX_ITEM_LENGTH * 2 + 1);
|
||||||
memset(menu_item_name, 0, MAX_ITEM_LENGTH * 2 + 1);
|
memset(menu_item_name, 0, MAX_ITEM_LENGTH * 2 + 1);
|
||||||
|
@ -221,7 +221,7 @@ menu_item_add(gchar *content, gint locked, GtkWidget *target_menu)
|
||||||
style_locked);
|
style_locked);
|
||||||
locked_count++;
|
locked_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add to menu */
|
/* add to menu */
|
||||||
gtk_menu_insert(GTK_MENU(hist_item->menu), hist_item->menu_item, 1);
|
gtk_menu_insert(GTK_MENU(hist_item->menu), hist_item->menu_item, 1);
|
||||||
|
|
||||||
|
@ -449,11 +449,11 @@ show_message(gchar *message, char *title,
|
||||||
|
|
||||||
/* set window title */
|
/* set window title */
|
||||||
gtk_window_set_title(GTK_WINDOW(dialog), title);
|
gtk_window_set_title(GTK_WINDOW(dialog), title);
|
||||||
|
|
||||||
loop = g_main_new(FALSE);
|
loop = g_main_new(FALSE);
|
||||||
g_main_run(loop);
|
g_main_run(loop);
|
||||||
g_main_destroy(loop);
|
g_main_destroy(loop);
|
||||||
gtk_widget_destroy(dialog);
|
gtk_widget_destroy(dialog);
|
||||||
|
|
||||||
return_val(button_pressed);
|
return_val(button_pressed);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ process_item(char *content, gint locked, gboolean exec)
|
||||||
if (action->action == ACT_EXEC && exec_immediately == TRUE
|
if (action->action == ACT_EXEC && exec_immediately == TRUE
|
||||||
&& exec == TRUE) {
|
&& exec == TRUE) {
|
||||||
exec_item(content, action);
|
exec_item(content, action);
|
||||||
}
|
}
|
||||||
if (action->action == ACT_SUBMENU) {
|
if (action->action == ACT_SUBMENU) {
|
||||||
/* test if such item already exists in this menu */
|
/* test if such item already exists in this menu */
|
||||||
processed = TRUE;
|
processed = TRUE;
|
||||||
|
@ -56,7 +56,7 @@ process_item(char *content, gint locked, gboolean exec)
|
||||||
selected = NULL;
|
selected = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dump_history_list("added item");
|
dump_history_list("added item");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ process_item(char *content, gint locked, gboolean exec)
|
||||||
|
|
||||||
if (processed == FALSE) {
|
if (processed == FALSE) {
|
||||||
hist_item = menu_item_add(content, locked, menu_hist);
|
hist_item = menu_item_add(content, locked, menu_hist);
|
||||||
|
|
||||||
/* when auto_take_up is true, set selection owner to myself */
|
/* when auto_take_up is true, set selection owner to myself */
|
||||||
if (auto_take_up == 1) {
|
if (auto_take_up == 1) {
|
||||||
selected = hist_item;
|
selected = hist_item;
|
||||||
|
@ -117,7 +117,7 @@ exec_item(char *content, ACTION *action)
|
||||||
gchar *converted;
|
gchar *converted;
|
||||||
|
|
||||||
converted = from_utf8(content);
|
converted = from_utf8(content);
|
||||||
|
|
||||||
/* If we're not given an action to perform, find the first matching
|
/* If we're not given an action to perform, find the first matching
|
||||||
* exec action, and perform it */
|
* exec action, and perform it */
|
||||||
if (!action) {
|
if (!action) {
|
||||||
|
@ -254,7 +254,7 @@ history_load(gboolean dump_only)
|
||||||
}
|
}
|
||||||
|
|
||||||
errno = tmp_errno;
|
errno = tmp_errno;
|
||||||
|
|
||||||
if (errno == 0)
|
if (errno == 0)
|
||||||
return_val(0);
|
return_val(0);
|
||||||
else
|
else
|
||||||
|
|
|
@ -50,7 +50,7 @@ global_keys_filter(GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
|
||||||
if (second == NULL) {
|
if (second == NULL) {
|
||||||
return_val(GDK_FILTER_REMOVE);
|
return_val(GDK_FILTER_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
move_item_to_begin((HISTORY_ITEM *) second->data);
|
move_item_to_begin((HISTORY_ITEM *) second->data);
|
||||||
|
|
||||||
return_val(GDK_FILTER_REMOVE);
|
return_val(GDK_FILTER_REMOVE);
|
||||||
|
@ -84,7 +84,7 @@ hotkey_parse(char *hotkey, guint *key, guint *mask)
|
||||||
begin_func("hotkey_parse");
|
begin_func("hotkey_parse");
|
||||||
|
|
||||||
*mask = 0;
|
*mask = 0;
|
||||||
|
|
||||||
for (i = 0; i < strlen(hotkey); i++) {
|
for (i = 0; i < strlen(hotkey); i++) {
|
||||||
c = hotkey[i];
|
c = hotkey[i];
|
||||||
if (isalpha(c)) {
|
if (isalpha(c)) {
|
||||||
|
@ -112,7 +112,7 @@ hotkey_parse(char *hotkey, guint *key, guint *mask)
|
||||||
g_free(tmp);
|
g_free(tmp);
|
||||||
return_val(-1);
|
return_val(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free(tmp);
|
g_free(tmp);
|
||||||
return_val(0);
|
return_val(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,44 +1,44 @@
|
||||||
#define ico_60x60_mask_width 60
|
#define ico_60x60_mask_width 60
|
||||||
#define ico_60x60_mask_height 60
|
#define ico_60x60_mask_height 60
|
||||||
static unsigned char ico_60x60_mask_bits[] = {
|
static unsigned char ico_60x60_mask_bits[] = {
|
||||||
0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff,
|
0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff,
|
||||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x03, 0x00, 0x00, 0x00,
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x03, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff,
|
0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff,
|
||||||
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xe7, 0x1f, 0x00, 0x00, 0x00,
|
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xe7, 0x1f, 0x00, 0x00, 0x00,
|
||||||
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff,
|
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0xff,
|
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0xff,
|
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff, 0xff,
|
0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf0, 0xff, 0xff, 0xff,
|
0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf0, 0xff, 0xff, 0xff,
|
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff,
|
0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
};
|
};
|
||||||
|
|
|
@ -66,7 +66,7 @@ action_append(char *expr_buf, char *action_buf, char *cmd_buf)
|
||||||
begin_func("action_append");
|
begin_func("action_append");
|
||||||
|
|
||||||
action = g_new0(ACTION, 1);
|
action = g_new0(ACTION, 1);
|
||||||
|
|
||||||
if (regcomp(&action->expression, expr_buf,
|
if (regcomp(&action->expression, expr_buf,
|
||||||
REG_EXTENDED|REG_ICASE|REG_NOSUB) != 0) {
|
REG_EXTENDED|REG_ICASE|REG_NOSUB) != 0) {
|
||||||
g_free(action);
|
g_free(action);
|
||||||
|
@ -83,11 +83,11 @@ action_append(char *expr_buf, char *action_buf, char *cmd_buf)
|
||||||
g_free(action);
|
g_free(action);
|
||||||
return_val(-102);
|
return_val(-102);
|
||||||
}
|
}
|
||||||
|
|
||||||
action->command = g_strdup(cmd_buf);
|
action->command = g_strdup(cmd_buf);
|
||||||
|
|
||||||
action_list = g_list_append(action_list, action);
|
action_list = g_list_append(action_list, action);
|
||||||
|
|
||||||
return_val(0);
|
return_val(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ rcconfig_get(char *fname)
|
||||||
buf_index = 0;
|
buf_index = 0;
|
||||||
} else
|
} else
|
||||||
error = 1;
|
error = 1;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_ACTION:
|
case STATE_ACTION:
|
||||||
|
|
|
@ -15,7 +15,7 @@ from_utf8(gchar *string) {
|
||||||
converted = g_locale_from_utf8(string, -1, &bytes_read, &bytes_written,
|
converted = g_locale_from_utf8(string, -1, &bytes_read, &bytes_written,
|
||||||
&error);
|
&error);
|
||||||
/* error_code = (error == NULL) ? 0 : error->code; */
|
/* error_code = (error == NULL) ? 0 : error->code; */
|
||||||
/*
|
/*
|
||||||
* fprintf(stderr, "from_utf8: %d b read, %d b written, error: %d\n",
|
* fprintf(stderr, "from_utf8: %d b read, %d b written, error: %d\n",
|
||||||
* bytes_read, bytes_written, error_code);
|
* bytes_read, bytes_written, error_code);
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -147,7 +147,7 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
signal(SIGCHLD, SIG_IGN);
|
signal(SIGCHLD, SIG_IGN);
|
||||||
|
|
||||||
/* initialize Gtk */
|
/* initialize Gtk */
|
||||||
|
@ -225,7 +225,7 @@ main(int argc, char **argv)
|
||||||
gtk_container_add(GTK_CONTAINER(dock_app), pixmap);
|
gtk_container_add(GTK_CONTAINER(dock_app), pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* create clipboard history menu */
|
/* create clipboard history menu */
|
||||||
menu_hist = gtk_menu_new();
|
menu_hist = gtk_menu_new();
|
||||||
gtk_menu_set_title(GTK_MENU(menu_hist), "Clipboard history");
|
gtk_menu_set_title(GTK_MENU(menu_hist), "Clipboard history");
|
||||||
|
@ -349,7 +349,7 @@ main(int argc, char **argv)
|
||||||
/* show icon */
|
/* show icon */
|
||||||
gtk_widget_show(dock_app);
|
gtk_widget_show(dock_app);
|
||||||
gtk_widget_show(main_window);
|
gtk_widget_show(main_window);
|
||||||
|
|
||||||
/* Set WMHints - after gtk_widget_show() due to changes in GTK+ 2.4 */
|
/* Set WMHints - after gtk_widget_show() due to changes in GTK+ 2.4 */
|
||||||
foo_set_wmhints(main_window, dock_app, argc, argv);
|
foo_set_wmhints(main_window, dock_app, argc, argv);
|
||||||
|
|
||||||
|
@ -357,19 +357,19 @@ main(int argc, char **argv)
|
||||||
gdk_window_shape_combine_mask(dock_app->window, icon_mask, 0, 0);
|
gdk_window_shape_combine_mask(dock_app->window, icon_mask, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* run clipboard monitor */
|
/* run clipboard monitor */
|
||||||
gtk_signal_connect(GTK_OBJECT(main_window),
|
gtk_signal_connect(GTK_OBJECT(main_window),
|
||||||
"selection_received",
|
"selection_received",
|
||||||
GTK_SIGNAL_FUNC(my_get_xselection),
|
GTK_SIGNAL_FUNC(my_get_xselection),
|
||||||
NULL);
|
NULL);
|
||||||
gtk_timeout_add(250, time_conv_select, NULL);
|
gtk_timeout_add(250, time_conv_select, NULL);
|
||||||
|
|
||||||
|
|
||||||
/* run autosave timer */
|
/* run autosave timer */
|
||||||
if (autosave_period > 0)
|
if (autosave_period > 0)
|
||||||
gtk_timeout_add(autosave_period * 1000, history_autosave, NULL);
|
gtk_timeout_add(autosave_period * 1000, history_autosave, NULL);
|
||||||
|
|
||||||
|
|
||||||
/* setup everything for supplying selection to other apps */
|
/* setup everything for supplying selection to other apps */
|
||||||
gtk_selection_add_target(dock_app,
|
gtk_selection_add_target(dock_app,
|
||||||
|
@ -389,7 +389,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
|
|
||||||
hotkeys_init();
|
hotkeys_init();
|
||||||
|
|
||||||
gtk_main();
|
gtk_main();
|
||||||
|
|
||||||
return_val(0);
|
return_val(0);
|
||||||
|
|
|
@ -69,7 +69,7 @@ extern gint locked_count;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#define dump_history_list(header) dump_history_list_fn(header)
|
#define dump_history_list(header) dump_history_list_fn(header)
|
||||||
#else
|
#else
|
||||||
#define dump_history_list(header)
|
#define dump_history_list(header)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ time_conv_select();
|
||||||
* handles request for selection from other apps
|
* handles request for selection from other apps
|
||||||
*/
|
*/
|
||||||
gint
|
gint
|
||||||
selection_handle(GtkWidget *widget,
|
selection_handle(GtkWidget *widget,
|
||||||
GtkSelectionData *selection_data,
|
GtkSelectionData *selection_data,
|
||||||
guint info,
|
guint info,
|
||||||
guint time_stamp,
|
guint time_stamp,
|
||||||
|
|
|
@ -91,7 +91,7 @@ exec_hotkey yes
|
||||||
# If action type is "exec", you can include "%s" string in command
|
# If action type is "exec", you can include "%s" string in command
|
||||||
# and it will be replaced with item content (don't use "%s" more
|
# and it will be replaced with item content (don't use "%s" more
|
||||||
# than once and any other occurrence of '%' character write as
|
# than once and any other occurrence of '%' character write as
|
||||||
# "%%"!!!).
|
# "%%"!!!).
|
||||||
# If action type is "submenu", command can be "-" (without quotes),
|
# If action type is "submenu", command can be "-" (without quotes),
|
||||||
# which means item will be placed in main menu, not in submenu. It's
|
# which means item will be placed in main menu, not in submenu. It's
|
||||||
# usable if you want to use "exec" and then put item into main menu.
|
# usable if you want to use "exec" and then put item into main menu.
|
||||||
|
|
Loading…
Reference in a new issue