From f68a0ad532919f36ffbbff0eb899dd175751e7b2 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Thu, 9 Feb 2023 17:02:50 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B1=D0=B0=D0=B3=20=D1=81=20=D0=B2=D1=8B=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B3=D1=80=D0=B0=D0=BC=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ublexec.cc | 21 +++++++++++++-------- source/ublexec.h | 1 + 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/source/ublexec.cc b/source/ublexec.cc index 867aa94..1dd39c7 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -121,7 +121,13 @@ void MainWindow::get_builder(){ builder->get_widget("iconDevelopment", iconDevelopment); builder->get_widget("iconSystem", iconSystem); builder->get_widget("lblSystem", lblSystem); - Gtk::IconView *array_icon[10]; + + + +} + + +void MainWindow::set_icon_array(){ array_icon[0]=this->iconGraphics; array_icon[1]=this->iconTools; array_icon[2]=this->iconInternet; @@ -132,12 +138,9 @@ void MainWindow::get_builder(){ array_icon[7]=this->iconOther; array_icon[8]=this->iconDevelopment; array_icon[9]=this->iconSystem; - - } - void MainWindow::template_apps_obj(Gtk::IconView *icon, Glib::RefPtr >k_list_app){ gtk_list_app = Gtk::ListStore::create(m_Columns); gtk_list_app->set_sort_column(m_Columns.m_col_description, Gtk::SORT_ASCENDING); @@ -268,9 +271,12 @@ void MainWindow::select_System(){ this->tempate_icon_select(this->iconSystem,list_System); } void MainWindow::tempate_icon_select(Gtk::IconView *icon, Glib::RefPtr >k_list){ + + auto selected = (*icon).get_selected_items(); if(!selected.empty()) - { + { + this->set_icon_array(); this->unselect_icon(icon); const Gtk::TreeModel::Path& path = *selected.begin(); Gtk::TreeModel::iterator iter = gtk_list->get_iter(path); @@ -294,10 +300,9 @@ void MainWindow::tempate_icon_select(Gtk::IconView *icon, Glib::RefPtrarray_icon[index]; - printf("%p %p", icon, icon_entry); - if (&icon_entry!=&icon){ + if (icon_entry!=icon){ cout << "11111" << endl; - //icon->unselect_all(); + icon->unselect_all(); } else{ cout << "22222" << endl; diff --git a/source/ublexec.h b/source/ublexec.h index 3144e5e..2154caa 100644 --- a/source/ublexec.h +++ b/source/ublexec.h @@ -102,6 +102,7 @@ public: void select_Development(); void select_System(); void icon_clear(); + void set_icon_array(); void unselect_icon(Gtk::IconView *icon_entry); string str_remove(std::string& source, const std::string& to_remove); vector split(const std::string &s, char delim);