Provide builtin defauls for treeview icons

This commit is contained in:
Berke Viktor 2012-10-13 15:31:25 +02:00
parent f7013f70a5
commit c01ee90ef6
16 changed files with 55 additions and 8 deletions

View File

@ -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;

View File

@ -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 */

View File

@ -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,

View File

@ -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);
}

View File

@ -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;

View File

@ -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)

BIN
src/pixmaps/channel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
src/pixmaps/dialog.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -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" />

View File

@ -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>

View File

@ -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" />

View File

@ -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>

BIN
src/pixmaps/server.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 B

BIN
src/pixmaps/util.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 919 B

View File

@ -33,7 +33,7 @@
<PythonOutput>hcpython</PythonOutput>
<Glib>$(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2</Glib>
<Gtk>$(DepsRoot)\include\gtk-2.0;$(DepsRoot)\lib\gtk-2.0\include;$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0</Gtk>
<Pixmaps>bookpng "$(SolutionDir)\..\src\pixmaps\book.png" hoppng "$(SolutionDir)\..\src\pixmaps\hop.png" oppng "$(SolutionDir)\..\src\pixmaps\op.png" purplepng "$(SolutionDir)\..\src\pixmaps\purple.png" redpng "$(SolutionDir)\..\src\pixmaps\red.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" voicepng "$(SolutionDir)\..\src\pixmaps\voice.png" hexchatpng "$(SolutionDir)\..\hexchat.png"</Pixmaps>
<Pixmaps>bookpng "$(SolutionDir)\..\src\pixmaps\book.png" hoppng "$(SolutionDir)\..\src\pixmaps\hop.png" oppng "$(SolutionDir)\..\src\pixmaps\op.png" purplepng "$(SolutionDir)\..\src\pixmaps\purple.png" redpng "$(SolutionDir)\..\src\pixmaps\red.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" voicepng "$(SolutionDir)\..\src\pixmaps\voice.png" channelpng "$(SolutionDir)\..\src\pixmaps\channel.png" dialogpng "$(SolutionDir)\..\src\pixmaps\dialog.png" serverpng "$(SolutionDir)\..\src\pixmaps\server.png" utilpng "$(SolutionDir)\..\src\pixmaps\util.png" hexchatpng "$(SolutionDir)\..\hexchat.png"</Pixmaps>
<DepLibs>gtk-win32-2.0.lib;gdk-win32-2.0.lib;atk-1.0.lib;gio-2.0.lib;gdk_pixbuf-2.0.lib;pangowin32-1.0.lib;pangocairo-1.0.lib;pango-1.0.lib;cairo.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;intl.lib;libxml2.lib;libeay32.lib;ssleay32.lib;wininet.lib;winmm.lib;ws2_32.lib</DepLibs>
<HexChatBuild>$(SolutionDir)build-xp</HexChatBuild>
<HexChatBin>$(HexChatBuild)\$(PlatformName)\bin\</HexChatBin>

View File

@ -35,7 +35,7 @@
<PythonOutput>hcpython</PythonOutput>
<Glib>$(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2</Glib>
<Gtk>$(DepsRoot)\include\gtk-2.0;$(DepsRoot)\lib\gtk-2.0\include;$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0</Gtk>
<Pixmaps>bookpng "$(SolutionDir)\..\src\pixmaps\book.png" hoppng "$(SolutionDir)\..\src\pixmaps\hop.png" oppng "$(SolutionDir)\..\src\pixmaps\op.png" purplepng "$(SolutionDir)\..\src\pixmaps\purple.png" redpng "$(SolutionDir)\..\src\pixmaps\red.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" voicepng "$(SolutionDir)\..\src\pixmaps\voice.png" hexchatpng "$(SolutionDir)\..\hexchat.png"</Pixmaps>
<Pixmaps>bookpng "$(SolutionDir)\..\src\pixmaps\book.png" hoppng "$(SolutionDir)\..\src\pixmaps\hop.png" oppng "$(SolutionDir)\..\src\pixmaps\op.png" purplepng "$(SolutionDir)\..\src\pixmaps\purple.png" redpng "$(SolutionDir)\..\src\pixmaps\red.png" trayfilepng "$(SolutionDir)\..\src\pixmaps\fileoffer.png" trayhilightpng "$(SolutionDir)\..\src\pixmaps\highlight.png" traymsgpng "$(SolutionDir)\..\src\pixmaps\message.png" voicepng "$(SolutionDir)\..\src\pixmaps\voice.png" channelpng "$(SolutionDir)\..\src\pixmaps\channel.png" dialogpng "$(SolutionDir)\..\src\pixmaps\dialog.png" serverpng "$(SolutionDir)\..\src\pixmaps\server.png" utilpng "$(SolutionDir)\..\src\pixmaps\util.png" hexchatpng "$(SolutionDir)\..\hexchat.png"</Pixmaps>
<DepLibs>gtk-win32-2.0.lib;gdk-win32-2.0.lib;atk-1.0.lib;gio-2.0.lib;gdk_pixbuf-2.0.lib;pangowin32-1.0.lib;pangocairo-1.0.lib;pango-1.0.lib;cairo.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;libintl.lib;libxml2.lib;libeay32.lib;ssleay32.lib;wininet.lib;winmm.lib;ws2_32.lib</DepLibs>
<HexChatBuild>$(SolutionDir)build</HexChatBuild>
<HexChatBin>$(HexChatBuild)\$(PlatformName)\bin\</HexChatBin>