diff options
author | berkeviktor@aol.com <berkeviktor@aol.com> | 2011-05-31 00:40:13 +0200 |
---|---|---|
committer | berkeviktor@aol.com <berkeviktor@aol.com> | 2011-05-31 00:40:13 +0200 |
commit | 5e4a60debe1c3643bcc455778e2ef7f6238c71c2 (patch) | |
tree | 84a4f2e484f35699ad83fe7be2a4577907c53dc7 /src | |
parent | 36eb489794fba5b456c895b0324eaca6f4b62ff9 (diff) |
support for own license text
Diffstat (limited to 'src')
-rw-r--r-- | src/common/cfgfiles.c | 2 | ||||
-rw-r--r-- | src/common/xchat.h | 1 | ||||
-rw-r--r-- | src/fe-gtk/about.c | 5 | ||||
-rw-r--r-- | src/fe-gtk/maingui.c | 14 |
4 files changed, 20 insertions, 2 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index d26198ed..a6a75aed 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -421,6 +421,7 @@ const struct prefs vars[] = { {"flood_msg_num", P_OFFINT (msg_number_limit), TYPE_INT}, {"flood_msg_time", P_OFFINT (msg_time_limit), TYPE_INT}, + {"gui_license", P_OFFSET (gui_license), TYPE_STR}, {"gui_auto_open_chat", P_OFFINT (autoopendccchatwindow), TYPE_BOOL}, {"gui_auto_open_dialog", P_OFFINT (autodialog), TYPE_BOOL}, {"gui_auto_open_recv", P_OFFINT (autoopendccrecvwindow), TYPE_BOOL}, @@ -696,6 +697,7 @@ load_config (void) #ifdef WIN32 prefs.identd = 1; #endif + strcpy (prefs.gui_license, ""); strcpy (prefs.stamp_format, "[%H:%M] "); strcpy (prefs.timestamp_log_format, "%b %d %H:%M:%S "); strcpy (prefs.logmask, "%n-%c.log"); diff --git a/src/common/xchat.h b/src/common/xchat.h index 2f695599..718e0e91 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -121,6 +121,7 @@ struct xchatprefs char partreason[256]; char font_normal[FONTNAMELEN + 1]; char doubleclickuser[256]; + char gui_license[64]; char sounddir[PATHLEN + 1]; char soundcmd[PATHLEN + 1]; char background[PATHLEN + 1]; diff --git a/src/fe-gtk/about.c b/src/fe-gtk/about.c index 6e69b646..e1e5149c 100644 --- a/src/fe-gtk/about.c +++ b/src/fe-gtk/about.c @@ -40,6 +40,7 @@ #include "../common/xchat.h" #include "../common/util.h" #include "../common/wdkutil.h" +#include "../common/xchatc.h" #include "palette.h" #include "pixmaps.h" #include "gtkutil.h" @@ -114,7 +115,8 @@ menu_about (GtkWidget * wid, gpointer sess) gtk_container_add (GTK_CONTAINER (vbox), label); g_get_charset (&locale); (snprintf) (buf, sizeof (buf), - "<span size=\"x-large\"><b>"DISPLAY_NAME" "PACKAGE_VERSION"</b></span>\n\n" + "<span size=\"x-large\"><b>"DISPLAY_NAME" "PACKAGE_VERSION"</b></span>\n" + "<span size=\"x-large\">%s</span>\n\n" #ifdef WIN32 "<b>XChat Release</b>: "XCHAT_RELEASE"\n\n" "<b>OS</b>: %s\n" @@ -127,6 +129,7 @@ menu_about (GtkWidget * wid, gpointer sess) "\302\251 1998-2010 Peter \305\275elezn\303\275 <zed@xchat.org>" /* "\n<a href=\"http://code.google.com/p/xchat-wdk/\">http://code.google.com/p/xchat-wdk/</a>" this is broken in gtk ATM */ "</small>", + prefs.gui_license, get_cpu_str (), locale, gtk_major_version, diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 27d47731..feea6549 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -476,10 +476,22 @@ fe_set_title (session *sess) break; default: def: - gtk_window_set_title (GTK_WINDOW (sess->gui->window), DISPLAY_NAME); + snprintf (tbuf, sizeof (tbuf), DISPLAY_NAME); + if (strcmp (prefs.gui_license, "")) /* zero means gui_license is empty */ + { + strcat (tbuf, " - "); + strcat (tbuf, prefs.gui_license); + } + gtk_window_set_title (GTK_WINDOW (sess->gui->window), tbuf); return; } + if (strcmp (prefs.gui_license, "")) /* zero means gui_license is empty */ + { + strcat (tbuf, " - "); + strcat (tbuf, prefs.gui_license); + } + gtk_window_set_title (GTK_WINDOW (sess->gui->window), tbuf); } |