[gtkmm-documentation] Use the pan-[up,down,start,end]-symbolic icons



commit 8a84ca975627f9fbc0da9e46c2bc6af4a2087d9e
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Sun May 22 16:24:00 2016 +0200

    Use the pan-[up,down,start,end]-symbolic icons
    
    * examples/others/arrow/arrow.cc: Use pan-[up,down,start,end]-symbolic
    * examples/others/cellrenderercustom/popupentry.cc: Use pan-down-symbolic
    These icons have been around for about two years now. They should be
    available in most systems.

 examples/others/arrow/arrow.cc                   |    8 --------
 examples/others/cellrenderercustom/popupentry.cc |   11 ++++-------
 2 files changed, 4 insertions(+), 15 deletions(-)
---
diff --git a/examples/others/arrow/arrow.cc b/examples/others/arrow/arrow.cc
index 28e95fd..088c64a 100644
--- a/examples/others/arrow/arrow.cc
+++ b/examples/others/arrow/arrow.cc
@@ -9,7 +9,6 @@
 // See https://bugzilla.gnome.org/show_bug.cgi?id=729565
 // If they are not available in your selected icon theme, perhaps you can
 // use the go-[up,down,previous,next]-symbolic icons.
-#define USE_PAN_ICON_NAMES 0
 
 class ArrowButton : public Gtk::Button
 {
@@ -26,17 +25,10 @@ ArrowButton::ArrowButton(Gtk::ArrowType arrow_type)
   Glib::ustring icon_name;
   switch (arrow_type)
   {
-#if USE_PAN_ICON_NAMES
     case Gtk::ARROW_UP:    icon_name = "pan-up-symbolic"; break;
     case Gtk::ARROW_DOWN:  icon_name = "pan-down-symbolic"; break;
     case Gtk::ARROW_LEFT:  icon_name = "pan-start-symbolic"; break;
     case Gtk::ARROW_RIGHT: icon_name = "pan-end-symbolic"; break;
-#else
-    case Gtk::ARROW_UP:    icon_name = "go-up-symbolic"; break;
-    case Gtk::ARROW_DOWN:  icon_name = "go-down-symbolic"; break;
-    case Gtk::ARROW_LEFT:  icon_name = "go-previous-symbolic"; break;
-    case Gtk::ARROW_RIGHT: icon_name = "go-next-symbolic"; break;
-#endif
     default:               icon_name = "dialog-question"; break;
   }
   set_image_from_icon_name(icon_name, Gtk::ICON_SIZE_BUTTON, true);
diff --git a/examples/others/cellrenderercustom/popupentry.cc 
b/examples/others/cellrenderercustom/popupentry.cc
index e5ab0f2..d12ea3d 100644
--- a/examples/others/cellrenderercustom/popupentry.cc
+++ b/examples/others/cellrenderercustom/popupentry.cc
@@ -1,5 +1,3 @@
-//$Id: popupentry.cc 457 2005-11-29 16:38:19Z murrayc $ -*- c++ -*-
-
 /* gtkmm example Copyright (C) 2002 gtkmm development team
  *
  * This program is free software; you can redistribute it and/or modify
@@ -21,11 +19,10 @@
 
 #include <gdk/gdkkeysyms.h>
 
-// 2014-05-21: The pan-[up,down,left,right]-symbolic icons are new.
+// 2014-09-06: The pan-[up,down,start,end]-symbolic icons are new.
 // See https://bugzilla.gnome.org/show_bug.cgi?id=729565
 // If they are not available in your selected icon theme, perhaps you can
-// use the go-[up,down,left,right]-symbolic icons.
-#define ICON_NAME_PREFIX "go" // preferably "pan"
+// use the go-[up,down,previous,next]-symbolic icons.
 
 PopupEntry::PopupEntry(const Glib::ustring& path)
 :
@@ -46,7 +43,7 @@ PopupEntry::PopupEntry(const Glib::ustring& path)
 
   button_ = new Gtk::Button();
   hbox->pack_start(*Gtk::manage(button_), Gtk::PACK_SHRINK);
-  button_->set_image_from_icon_name(ICON_NAME_PREFIX "-down-symbolic", Gtk::ICON_SIZE_BUTTON, true);
+  button_->set_image_from_icon_name("pan-down-symbolic", Gtk::ICON_SIZE_BUTTON, true);
 
   set_can_focus();
   add_events(Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK);
@@ -90,7 +87,7 @@ int PopupEntry::get_button_width()
   Gtk::Button *const button = new Gtk::Button();
   window.add(*Gtk::manage(button));
 
-  button->set_image_from_icon_name(ICON_NAME_PREFIX "-down-symbolic", Gtk::ICON_SIZE_BUTTON, true);
+  button->set_image_from_icon_name("pan-down-symbolic", Gtk::ICON_SIZE_BUTTON, true);
 
   // Urgh.  Hackish :/
   window.move(-500, -500);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]