diff --git a/src/repsnapper-icon.svg b/src/repsnapper-icon.svg index a0ea65c8..dd6ddf10 100644 --- a/src/repsnapper-icon.svg +++ b/src/repsnapper-icon.svg @@ -9,28 +9,21 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="48px" - height="48px" + width="256" + height="256" id="svg10139" version="1.1" inkscape:version="0.48.4 r9939" - sodipodi:docname="repsnapper.svg" + sodipodi:docname="repsnapper-icon16.svg" inkscape:export-filename="/home/churchyard/Obrázky/repsnapper/repsnapper16.png" - inkscape:export-xdpi="30" - inkscape:export-ydpi="30"> + inkscape:export-xdpi="5.625" + inkscape:export-ydpi="5.625"> - - - + id="filter10953" + color-interpolation-filters="sRGB"> @@ -66,31 +59,38 @@ image/svg+xml - + + + + Miroslav Hrončok <miro@hroncok.cz> + + + + + + + + + + - - - - + inkscape:groupmode="layer" + transform="translate(0,208)"> + id="g10167" + transform="matrix(5.3729942,0,0,5.3729942,-0.95185979,-208.99005)"> - - diff --git a/src/repsnapper.cpp b/src/repsnapper.cpp index 03c2d79a..1042da5a 100644 --- a/src/repsnapper.cpp +++ b/src/repsnapper.cpp @@ -310,10 +310,7 @@ int main(int argc, char **argv) mainwin->setNonPrintingMode(nonprintingmode, opts.gcode_output_path); Glib::RefPtr iconfile = find_global_config("repsnapper-icon.svg"); - if (iconfile) - mainwin->set_icon_from_file(iconfile->get_path()); - else - mainwin->set_icon_name("gtk-convert"); + mainwin->set_icon_file(iconfile); mainwin->set_title("Repsnapper"); if (opts.stl_input_path.size() > 0) { diff --git a/src/ui/prefs_dlg.h b/src/ui/prefs_dlg.h index 594978f4..eb4cc678 100644 --- a/src/ui/prefs_dlg.h +++ b/src/ui/prefs_dlg.h @@ -38,6 +38,7 @@ class PrefsDlg { PrefsDlg(Model *model, Glib::RefPtr &builder); ~PrefsDlg(); void show(); + void set_icon_from_file(const string path) {m_preferences_dlg->set_icon_from_file(path);} }; #endif // SETTINGS_H diff --git a/src/ui/view.cpp b/src/ui/view.cpp index d9f2a93b..124a73a5 100644 --- a/src/ui/view.cpp +++ b/src/ui/view.cpp @@ -591,6 +591,17 @@ void View::hide_on_response(int, Gtk::Dialog *dialog) dialog->hide(); } +void View::set_icon_file(Glib::RefPtr file) +{ + iconfile = file; + if (iconfile) { + set_icon_from_file(iconfile->get_path()); + m_settings_ui->set_icon_from_file(iconfile->get_path()); + } else + set_icon_name("gtk-convert"); +} + + void View::show_dialog(const char *name) { Gtk::Dialog *dialog; @@ -599,7 +610,10 @@ void View::show_dialog(const char *name) cerr << "no such dialog " << name << "\n"; return; } - dialog->set_icon_name("gtk-convert"); + if (iconfile) + dialog->set_icon_from_file(iconfile->get_path()); + else + dialog->set_icon_name("gtk-convert"); dialog->signal_response().connect (sigc::bind(sigc::mem_fun(*this, &View::hide_on_response), dialog)); dialog->show(); // dialog->set_transient_for (*this); diff --git a/src/ui/view.h b/src/ui/view.h index 296b2655..7d355e18 100644 --- a/src/ui/view.h +++ b/src/ui/view.h @@ -233,6 +233,9 @@ class View : public Gtk::Window Glib::Mutex mutex; + Glib::RefPtr iconfile; + void set_icon_file(Glib::RefPtr iconfile); + }; #ifdef MODEL_IMPLEMENTATION