diff options
| author | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2008-03-12 15:56:40 +0000 |
|---|---|---|
| committer | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2008-03-12 15:56:40 +0000 |
| commit | 66d9144fe818665e42e26dcf568cb41cb1e6fd3a (patch) | |
| tree | a2cc4fc997b1f27364571589b782337aed7c793f /src/lingot-mainframe.c | |
| parent | bda13958507aefad80b2babb577ae4b8f5341c51 (diff) | |
- add advertisement banner for WIN32 build
git-svn-id: https://lampka.siedziba.pl:790/svn/repos/lingot-win32@297 455248ca-bdda-0310-9134-f4ebb693071a
Diffstat (limited to 'src/lingot-mainframe.c')
| -rw-r--r-- | src/lingot-mainframe.c | 24 |
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 |
