diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-10-13 15:31:25 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-10-13 15:31:25 +0200 |
commit | c01ee90ef6eaf62e1ec3b10567a54a0b7c0a3977 (patch) | |
tree | 9bf150d2ad74f0c8730aa7d282bddef7bfea27c3 /src | |
parent | f7013f70a53f644e0326d32287d59b91f627e792 (diff) |
Provide builtin defauls for treeview icons
Diffstat (limited to 'src')
-rw-r--r-- | src/common/cfgfiles.c | 5 | ||||
-rw-r--r-- | src/common/xchat.h | 2 | ||||
-rw-r--r-- | src/fe-gtk/maingui.c | 4 | ||||
-rw-r--r-- | src/fe-gtk/pixmaps.c | 7 | ||||
-rw-r--r-- | src/fe-gtk/setup.c | 3 | ||||
-rw-r--r-- | src/pixmaps/Makefile.am | 6 | ||||
-rw-r--r-- | src/pixmaps/channel.png | bin | 0 -> 3444 bytes | |||
-rw-r--r-- | src/pixmaps/dialog.png | bin | 0 -> 1098 bytes | |||
-rw-r--r-- | src/pixmaps/pixmaps-xp.vcxproj | 4 | ||||
-rw-r--r-- | src/pixmaps/pixmaps-xp.vcxproj.filters | 12 | ||||
-rw-r--r-- | src/pixmaps/pixmaps.vcxproj | 4 | ||||
-rw-r--r-- | src/pixmaps/pixmaps.vcxproj.filters | 12 | ||||
-rw-r--r-- | src/pixmaps/server.png | bin | 0 -> 927 bytes | |||
-rw-r--r-- | src/pixmaps/util.png | bin | 0 -> 919 bytes |
14 files changed, 53 insertions, 6 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 3085168c..e8b598fc 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -562,9 +562,7 @@ const struct prefs vars[] = { {"tab_chans", P_OFFINT (tabchannels), TYPE_BOOL}, {"tab_dialogs", P_OFFINT (privmsgtab), TYPE_BOOL}, -#ifdef WIN32 {"tab_icons", P_OFFINT (tab_icons), TYPE_BOOL}, -#endif {"tab_layout", P_OFFINT (tab_layout), TYPE_INT}, {"tab_new_to_front", P_OFFINT (newtabstofront), TYPE_INT}, {"tab_notices", P_OFFINT (notices_tabs), TYPE_BOOL}, @@ -690,6 +688,7 @@ load_config (void) prefs.text_stripcolor_topic = 1; prefs.tabchannels = 1; prefs.tab_layout = 2; /* 0=Tabs 1=Reserved 2=Tree */ + prefs.tab_icons = 1; prefs.tab_sort = 1; prefs.paned_userlist = 1; prefs.newtabstofront = 2; @@ -732,7 +731,7 @@ load_config (void) prefs.gui_chanlist_maxusers = 9999; prefs.gui_chanlist_minusers = 5; prefs.gui_tray = 1; - prefs.gui_pane_left_size = 100; + prefs.gui_pane_left_size = 128; /* with treeview icons we need a bit bigger space */ prefs.gui_pane_right_size = 100; prefs.gui_pane_right_size_min = 80; prefs.mainwindow_save = 1; diff --git a/src/common/xchat.h b/src/common/xchat.h index 6f82ed76..7767d709 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -205,6 +205,7 @@ struct xchatprefs char dcc_ip_str[DOMAINLEN + 1]; unsigned int tab_small; + unsigned int tab_icons; unsigned int tab_sort; unsigned int mainwindow_save; unsigned int perc_color; @@ -312,7 +313,6 @@ struct xchatprefs #ifdef WIN32 unsigned int identd; unsigned int emoticons; - unsigned int tab_icons; #endif unsigned int ctcp_number_limit; /*flood */ diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 41cbb2a6..3dbac7af 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -2915,8 +2915,10 @@ mg_create_tabs (session_gui *gui) /* if any one of these PNGs exist, the chanview will create * the extra column for icons. */ - if (pix_channel || pix_dialog || pix_server || pix_util) + if (prefs.tab_icons && (pix_channel || pix_dialog || pix_server || pix_util)) + { use_icons = TRUE; + } gui->chanview = chanview_new (prefs.tab_layout, prefs.truncchans, prefs.tab_sort, use_icons, diff --git a/src/fe-gtk/pixmaps.c b/src/fe-gtk/pixmaps.c index c802f508..4211c6f5 100644 --- a/src/fe-gtk/pixmaps.c +++ b/src/fe-gtk/pixmaps.c @@ -137,9 +137,16 @@ pixmaps_init (void) pix_tray_hilight = load_pixmap ("highlight", trayhilightpng, 1); pix_tray_file = load_pixmap ("fileoffer", trayfilepng, 1); +#if 0 /* treeview icons, no defaults, load from disk only */ pix_channel = load_pixmap ("channel", NULL, 0); pix_dialog = load_pixmap ("dialog", NULL, 0); pix_server = load_pixmap ("server", NULL, 0); pix_util = load_pixmap ("util", NULL, 0); +#endif + /* provide inline defaults for these coz they are nice! */ + pix_channel = load_pixmap ("channel", channelpng, 1); + pix_dialog = load_pixmap ("dialog", dialogpng, 1); + pix_server = load_pixmap ("server", serverpng, 1); + pix_util = load_pixmap ("util", utilpng, 1); } diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 60a17a0c..742eb0b3 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -266,6 +266,7 @@ static const setting tabs_settings[] = {ST_TOGGLE, N_("Open an extra tab for server notices"), P_OFFINTNL(notices_tabs), 0, 0, 0}, {ST_TOGGLE, N_("Open a new tab when you receive a private message"), P_OFFINTNL(autodialog), 0, 0, 0}, {ST_TOGGLE, N_("Sort tabs in alphabetical order"), P_OFFINTNL(tab_sort), 0, 0, 0}, + {ST_TOGGLE, N_("Show icons in tree view"), P_OFFINTNL(tab_icons), 0, 0, 0}, {ST_TOGGLE, N_("Smaller text"), P_OFFINTNL(tab_small), 0, 0, 0}, #if 0 {ST_MENU, N_("Focus new tabs:"), P_OFFINTNL(newtabstofront), 0, focusnewtabsmenu, 0}, @@ -2147,6 +2148,8 @@ setup_apply (struct xchatprefs *pr) noapply = TRUE; if (DIFF (truncchans)) noapply = TRUE; + if (DIFF (tab_icons)) + noapply = TRUE; if (DIFF (tab_layout)) do_layout = TRUE; diff --git a/src/pixmaps/Makefile.am b/src/pixmaps/Makefile.am index 6dff376c..65f8cb89 100644 --- a/src/pixmaps/Makefile.am +++ b/src/pixmaps/Makefile.am @@ -9,9 +9,13 @@ LIST = traymsgpng $(srcdir)/message.png \ purplepng $(srcdir)/purple.png \ redpng $(srcdir)/red.png \ voicepng $(srcdir)/voice.png \ + channelpng $(srcdir)/channel.png \ + dialogpng $(srcdir)/dialog.png \ + serverpng $(srcdir)/server.png \ + utilpng $(srcdir)/util.png \ hexchatpng $(srcdir)/../../hexchat.png -PNGS = message.png highlight.png fileoffer.png book.png hop.png op.png purple.png red.png voice.png +PNGS = message.png highlight.png fileoffer.png book.png hop.png op.png purple.png red.png voice.png channel.png dialog.png server.png util.png noinst_HEADERS = inline_pngs.h CLEANFILES = $(noinst_HEADERS) EXTRA_DIST = $(PNGS) diff --git a/src/pixmaps/channel.png b/src/pixmaps/channel.png new file mode 100644 index 00000000..a2d6c9eb --- /dev/null +++ b/src/pixmaps/channel.png Binary files differdiff --git a/src/pixmaps/dialog.png b/src/pixmaps/dialog.png new file mode 100644 index 00000000..54bd3a0f --- /dev/null +++ b/src/pixmaps/dialog.png Binary files differdiff --git a/src/pixmaps/pixmaps-xp.vcxproj b/src/pixmaps/pixmaps-xp.vcxproj index 24e63fd1..2a3a8a6b 100644 --- a/src/pixmaps/pixmaps-xp.vcxproj +++ b/src/pixmaps/pixmaps-xp.vcxproj @@ -96,6 +96,8 @@ <ItemGroup> <None Include="..\..\hexchat.png" /> <None Include="book.png" /> + <None Include="channel.png" /> + <None Include="dialog.png" /> <None Include="fileoffer.png" /> <None Include="highlight.png" /> <None Include="hop.png" /> @@ -103,6 +105,8 @@ <None Include="op.png" /> <None Include="purple.png" /> <None Include="red.png" /> + <None Include="server.png" /> + <None Include="util.png" /> <None Include="voice.png" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> diff --git a/src/pixmaps/pixmaps-xp.vcxproj.filters b/src/pixmaps/pixmaps-xp.vcxproj.filters index 5944362a..82b5ddef 100644 --- a/src/pixmaps/pixmaps-xp.vcxproj.filters +++ b/src/pixmaps/pixmaps-xp.vcxproj.filters @@ -37,5 +37,17 @@ <None Include="..\..\hexchat.png"> <Filter>Resource Files</Filter> </None> + <None Include="channel.png"> + <Filter>Resource Files</Filter> + </None> + <None Include="dialog.png"> + <Filter>Resource Files</Filter> + </None> + <None Include="server.png"> + <Filter>Resource Files</Filter> + </None> + <None Include="util.png"> + <Filter>Resource Files</Filter> + </None> </ItemGroup> </Project> \ No newline at end of file diff --git a/src/pixmaps/pixmaps.vcxproj b/src/pixmaps/pixmaps.vcxproj index 84f89609..812fa805 100644 --- a/src/pixmaps/pixmaps.vcxproj +++ b/src/pixmaps/pixmaps.vcxproj @@ -93,6 +93,8 @@ <ItemGroup> <None Include="..\..\hexchat.png" /> <None Include="book.png" /> + <None Include="channel.png" /> + <None Include="dialog.png" /> <None Include="fileoffer.png" /> <None Include="highlight.png" /> <None Include="hop.png" /> @@ -100,6 +102,8 @@ <None Include="op.png" /> <None Include="purple.png" /> <None Include="red.png" /> + <None Include="server.png" /> + <None Include="util.png" /> <None Include="voice.png" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> diff --git a/src/pixmaps/pixmaps.vcxproj.filters b/src/pixmaps/pixmaps.vcxproj.filters index 5944362a..82b5ddef 100644 --- a/src/pixmaps/pixmaps.vcxproj.filters +++ b/src/pixmaps/pixmaps.vcxproj.filters @@ -37,5 +37,17 @@ <None Include="..\..\hexchat.png"> <Filter>Resource Files</Filter> </None> + <None Include="channel.png"> + <Filter>Resource Files</Filter> + </None> + <None Include="dialog.png"> + <Filter>Resource Files</Filter> + </None> + <None Include="server.png"> + <Filter>Resource Files</Filter> + </None> + <None Include="util.png"> + <Filter>Resource Files</Filter> + </None> </ItemGroup> </Project> \ No newline at end of file diff --git a/src/pixmaps/server.png b/src/pixmaps/server.png new file mode 100644 index 00000000..24b4ed98 --- /dev/null +++ b/src/pixmaps/server.png Binary files differdiff --git a/src/pixmaps/util.png b/src/pixmaps/util.png new file mode 100644 index 00000000..daa87702 --- /dev/null +++ b/src/pixmaps/util.png Binary files differ |