23 |
|
|
24 |
#include <gtk/gtk.h> |
#include <gtk/gtk.h> |
25 |
#include <string.h> |
#include <string.h> |
26 |
|
#include <stdlib.h> |
27 |
#ifndef __USE_XOPEN |
#ifndef __USE_XOPEN |
28 |
#define __USE_XOPEN |
#define __USE_XOPEN |
29 |
#endif |
#endif |
46 |
extern preferencestype preferences; |
extern preferencestype preferences; |
47 |
extern GList *logwindowlist; |
extern GList *logwindowlist; |
48 |
|
|
49 |
|
/* get the action name and use it to switch logs <alt>1, <alt>2, etc. */ |
50 |
|
void |
51 |
|
on_menu_log_activate (GtkAction *action, gpointer user_data) |
52 |
|
{ |
53 |
|
const gchar *name; |
54 |
|
gchar **split; |
55 |
|
gint lognr; |
56 |
|
|
57 |
|
name = gtk_action_get_name(action); |
58 |
|
split = g_strsplit (name, " ", 2); |
59 |
|
lognr = atoi (split[1]); |
60 |
|
g_strfreev (split); |
61 |
|
if (lognr <= g_list_length (logwindowlist)) |
62 |
|
gtk_notebook_set_current_page (GTK_NOTEBOOK (mainnotebook), lognr - 1); |
63 |
|
} |
64 |
|
|
65 |
|
|
66 |
void |
void |
67 |
on_menu_exit_activate (GtkMenuItem * menuitem, gpointer user_data) |
on_menu_exit_activate (GtkMenuItem * menuitem, gpointer user_data) |
68 |
{ |
{ |