From 2b6cf37d208c45cc0d58b5630cc060a0315b7d87 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 16 Mar 2019 00:21:11 +0100 Subject: [PATCH] IRCClient: Add some more toolbar actions. Starting to look nice. --- Applications/IRCClient/IRCAppWindow.cpp | 17 +++++++++++++++++ Base/res/icons/16x16/irc-close-query.png | Bin 0 -> 370 bytes Base/res/icons/16x16/irc-close-query.rgb | Bin 0 -> 1024 bytes Base/res/icons/16x16/irc-open-query.png | Bin 0 -> 342 bytes Base/res/icons/16x16/irc-open-query.rgb | Bin 0 -> 1024 bytes Base/res/icons/16x16/irc-whois.png | Bin 0 -> 338 bytes Base/res/icons/16x16/irc-whois.rgb | Bin 0 -> 1024 bytes 7 files changed, 17 insertions(+) create mode 100644 Base/res/icons/16x16/irc-close-query.png create mode 100644 Base/res/icons/16x16/irc-close-query.rgb create mode 100644 Base/res/icons/16x16/irc-open-query.png create mode 100644 Base/res/icons/16x16/irc-open-query.rgb create mode 100644 Base/res/icons/16x16/irc-whois.png create mode 100644 Base/res/icons/16x16/irc-whois.rgb diff --git a/Applications/IRCClient/IRCAppWindow.cpp b/Applications/IRCClient/IRCAppWindow.cpp index 0595e7de45..01ee8d101d 100644 --- a/Applications/IRCClient/IRCAppWindow.cpp +++ b/Applications/IRCClient/IRCAppWindow.cpp @@ -59,9 +59,26 @@ void IRCAppWindow::setup_widgets() printf("FIXME: Implement part action\n"); }); + auto whois_action = GAction::create("Whois user", GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/16x16/irc-whois.rgb", { 16, 16 }), [] (auto&) { + printf("FIXME: Implement whois action\n"); + }); + + auto open_query_action = GAction::create("Open query", GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/16x16/irc-open-query.rgb", { 16, 16 }), [] (auto&) { + printf("FIXME: Implement open-query action\n"); + }); + + auto close_query_action = GAction::create("Close query", GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/16x16/irc-close-query.rgb", { 16, 16 }), [] (auto&) { + printf("FIXME: Implement close-query action\n"); + }); + auto* toolbar = new GToolBar(widget); toolbar->add_action(join_action.copy_ref()); toolbar->add_action(part_action.copy_ref()); + toolbar->add_separator(); + toolbar->add_action(whois_action.copy_ref()); + toolbar->add_action(open_query_action.copy_ref()); + toolbar->add_action(close_query_action.copy_ref()); + auto* horizontal_container = new GWidget(widget); printf("horizontal_widget: %s{%p}\n", horizontal_container->class_name(), horizontal_container); diff --git a/Base/res/icons/16x16/irc-close-query.png b/Base/res/icons/16x16/irc-close-query.png new file mode 100644 index 0000000000000000000000000000000000000000..6fdce401d785f5feb48ed08463ed05a0e099b2f2 GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7*pj^6T^O1ftQl7PHw&1? zz`(#+;1OBOz@VoL!i*J5?aLS#7}!fZeO=ifGxLkHsonc&*TTTSAX(xXQR1ARo12#*vfAC)S4UZbPW`V-eo&~m`{crvj*3>d zt-T+YUF2xm>^Nmlh@(_@Z9dXU9HYEU$xaX|9O>XF$XIUOAxG##j1kQ!t?$ZU`ts%q>! zkUC_2AT~%0yK3yBAoU=9Agpeh|6kp-;19A&5Fdn*#gN(P`mF<2{DG+l(a3yseIUIc z46+-9L2Qs4tOJ(+htLSKV0uAnKp3PR7gjed_zyD!rVm6D(g!jRp%>E(Li&;QqL~E_ TQ;>dq802RVMpgsjgTfI2!Gi(I literal 0 HcmV?d00001 diff --git a/Base/res/icons/16x16/irc-open-query.png b/Base/res/icons/16x16/irc-open-query.png new file mode 100644 index 0000000000000000000000000000000000000000..d0d7a6af547c8c3b329b106dfee6f7c015dc1dcb GIT binary patch literal 342 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7*pj^6T^O1ftQl7PHw&1? zz`(#+;1OBOz@VoL!i*J5?aLS#7}!fZeO=ifGxLkHv!=GzZD(L$kSuYHC~?lu%}vcK zVQ?-=O)N=GQ7F$W$xv|j^bH7a=Rg-rmDm9Lk2XK1v=s;-HwIa;+?8-GUpeJ}(sizPoF^XWQc4vr@!kb{4fB zyV!A7U`ENqL0ZdhyEl-$=HQUV9=O5%vR6KV7(eoV!JV|$dH$OZz rRa-|Vqm#w{$N7UFo*gk3QDnIHDVB?eOJpho0|SGntDnm{r-UW|8!LWF literal 0 HcmV?d00001 diff --git a/Base/res/icons/16x16/irc-open-query.rgb b/Base/res/icons/16x16/irc-open-query.rgb new file mode 100644 index 0000000000000000000000000000000000000000..fcef05192cc95401728fd6a4be9f6c364eba034d GIT binary patch literal 1024 zcmZR;0d#b9{v%@?%CHK9^x4_j{YS@Z9dXU9HYEU$xaX|9O>XF$XIUOAxG##j1kQ!t?$ZU`ts%q>! zkUC_2AT~%0yK3yBAoU=9APi!IRGAd0|AAo;A0Gzk0qF%{5F4Zxq}OkSHP{Rg9~%a# zg<+6h5H`tI{}01{%dP)|%za^R9~iH&hOm*`0n!Uoi;V{9hhdNz nU^d821?qo5_7l<%GZUl_rXQpSq!)xiY+^7h3_vtUJxDJAtegQi literal 0 HcmV?d00001 diff --git a/Base/res/icons/16x16/irc-whois.png b/Base/res/icons/16x16/irc-whois.png new file mode 100644 index 0000000000000000000000000000000000000000..53019fd4bd93c8884d0b9e41fa675db56feab5ea GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7*pj^6T^O1ftQl7PHw&1? zz`(#+;1OBOz@VoL!i*J5?aLS#7}!fZeO=ifGxLjCm^FLGuVP?ekSuYHC~?lu%}vcK zVQ?-=O)N=GQ7F$W$xv|j^bH7a=Rg-rmDm9Lk2XK1v=s;-HwIa;=Pwjjhe6Rl1<;$)fNcm7NN~580ZRDw)gZ z_Y42_FOfK4BESE?s2c1sYVgq@eXw{3>4CWc#3lxV^usVnJxD(Ql(j3s literal 0 HcmV?d00001