summaryrefslogtreecommitdiffhomepage
path: root/src/lingot-mainframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lingot-mainframe.c')
-rw-r--r--src/lingot-mainframe.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lingot-mainframe.c b/src/lingot-mainframe.c
index a98c16d..39c13d4 100644
--- a/src/lingot-mainframe.c
+++ b/src/lingot-mainframe.c
@@ -37,6 +37,12 @@
#include "lingot-background.xpm"
#include "lingot-logo.xpm"
+#include "lingot-banner.xpm"
+
+#ifdef __WIN32__
+#include "windows.h"
+#include "shellapi.h"
+#endif
void lingot_mainframe_redraw(LingotMainFrame*);
void lingot_mainframe_put_frequency(LingotMainFrame*);
@@ -174,6 +180,13 @@ gboolean lingot_mainframe_callback_frequency(gpointer data) {
return 0;
}
+#ifdef __WIN32__
+gboolean lingot_mainframe_callback_open_url(gpointer data) {
+ ShellExecute(NULL, "open", "http://gitara.org.pl", NULL, NULL, SW_SHOW);
+ return 0;
+}
+#endif
+
void lingot_mainframe_color(GdkColor* color, int red, int green, int blue) {
color->red = red;
color->green = green;
@@ -314,6 +327,17 @@ LingotMainFrame* lingot_mainframe_new(int argc, char *argv[]) {
gtk_menu_bar_set_shadow_type( GTK_MENU_BAR (menu_bar), GTK_SHADOW_NONE );
#endif
+#ifdef __WIN32__
+ {
+ GtkWidget *banner = gtk_button_new();
+ gtk_signal_connect(GTK_OBJECT(banner), "clicked",
+ GTK_SIGNAL_FUNC(lingot_mainframe_callback_open_url), "http://gitara.org.pl");
+ GtkWidget *banner_image = gtk_image_new_from_pixbuf(gdk_pixbuf_new_from_xpm_data(lingot_banner_xpm));
+ gtk_button_set_image(banner, banner_image);
+ gtk_box_pack_start_defaults(GTK_BOX(vertical_box), banner);
+ }
+#endif
+
////////////////////////////////////////////////////
// a fixed container to put the two upper frames in fixed positions