Author: baggins Date: Sat Aug 7 20:55:17 2010 GMT Module: packages Tag: HEAD ---- Log message: - remove useless debian-centric crap - display an icon/pixmap instead of a label as main menu - put icon where gnome wants it
---- Files affected: packages/gnome-applet-sshmenu: gnome-applet-sshmenu.spec (1.1 -> 1.2) , gnome-applet-sshmenu-pixmap.patch (NONE -> 1.1) (NEW), gnome-applet-sshmenu-undebianize.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/gnome-applet-sshmenu/gnome-applet-sshmenu.spec diff -u packages/gnome-applet-sshmenu/gnome-applet-sshmenu.spec:1.1 packages/gnome-applet-sshmenu/gnome-applet-sshmenu.spec:1.2 --- packages/gnome-applet-sshmenu/gnome-applet-sshmenu.spec:1.1 Sun Aug 1 01:22:56 2010 +++ packages/gnome-applet-sshmenu/gnome-applet-sshmenu.spec Sat Aug 7 22:55:12 2010 @@ -1,13 +1,15 @@ # $Revision$, $Date$ Summary: A GNOME panel applet for connecting to hosts using SSH -Name: sshmenu +Name: gnome-applet-sshmenu Version: 3.18 -Release: 0.3 +Release: 0.5 License: BSD-like Group: Applications -Source0: http://dl.sourceforge.net/sshmenu/%{name}-%{version}.tar.gz +Source0: http://dl.sourceforge.net/sshmenu/sshmenu-%{version}.tar.gz # Source0-md5: 7e7f43135fd112be3c173ec8585d6b98 Patch0: %{name}-ruby19.patch +Patch1: %{name}-undebianize.patch +Patch2: %{name}-pixmap.patch URL: http://sshmenu.sourceforge.net/ Requires: ruby-gnome2 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -29,8 +31,10 @@ Pakiet ten dostarcza bashowe uzupełnianie nazw dla sshmenu. %prep -%setup -q +%setup -q -n sshmenu-%{version} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 sed -i -e 's|/usr/lib$|%{_libdir}/|g' \ -e 's|gnome-panel/sshmenu-applet|sshmenu-applet|g' Makefile @@ -46,6 +50,9 @@ mv $RPM_BUILD_ROOT%{_libdir}/ruby/{1.8,1.9} +install -d $RPM_BUILD_ROOT%{_pixmapsdir} +mv $RPM_BUILD_ROOT{%{_iconsdir}/hicolor/48x48/apps,%{_pixmapsdir}}/gnome-sshmenu-applet.png + %clean rm -rf $RPM_BUILD_ROOT @@ -56,7 +63,7 @@ %{_libdir}/bonobo/servers/*.server %{ruby_rubylibdir}/*sshmenu.rb %attr(755,root,root) %{_libdir}/sshmenu-applet -%{_iconsdir}/hicolor/48x48/apps/gnome-sshmenu-applet.png +%{_pixmapsdir}/gnome-sshmenu-applet.png %{_mandir}/man1/sshmenu*.1* %files -n bash-completion-sshmenu @@ -69,6 +76,11 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.2 2010/08/07 20:55:12 baggins +- remove useless debian-centric crap +- display an icon/pixmap instead of a label as main menu +- put icon where gnome wants it + Revision 1.1 2010/07/31 23:22:56 baggins - initial revision ================================================================ Index: packages/gnome-applet-sshmenu/gnome-applet-sshmenu-pixmap.patch diff -u /dev/null packages/gnome-applet-sshmenu/gnome-applet-sshmenu-pixmap.patch:1.1 --- /dev/null Sat Aug 7 22:55:17 2010 +++ packages/gnome-applet-sshmenu/gnome-applet-sshmenu-pixmap.patch Sat Aug 7 22:55:12 2010 @@ -0,0 +1,146 @@ +diff -ur sshmenu-3.18/lib/sshmenu.rb sshmenu-3.18-pixmap/lib/sshmenu.rb +--- sshmenu-3.18/lib/sshmenu.rb 2009-08-24 10:25:06.000000000 +0200 ++++ sshmenu-3.18-pixmap/lib/sshmenu.rb 2010-08-07 22:26:36.550033809 +0200 +@@ -197,6 +197,7 @@ + def Factory.option_defaults + return { + :window => nil, ++ :applet => 0, + :model_class => SSHMenu::Config, + :args => ARGV + } +@@ -282,6 +283,9 @@ + getopts(@options[:args]) + @app_win = @options[:window] || default_container + @entry_box = nil ++ if @options[:applet] ++ @orientation = @options[:applet] ++ end + + inject_defaults + get_initial_config +@@ -345,15 +349,13 @@ + + evbox = Gtk::EventBox.new + evbox.signal_connect('button-press-event') { |w,e| on_click(w,e) } +- hbox.pack_start(evbox, false, false) ++ hbox.pack_start(evbox, true, true) + +- @frame = Gtk::Frame.new +- set_button_border; +- evbox.add(@frame) +- +- label = Gtk::Label.new("SSH") +- label.set_padding(2, 2) +- @frame.add(label) ++ @size = @app_win.allocation.height ++ @pixbuf = Gdk::Pixbuf.new("/usr/share/pixmaps/gnome-sshmenu-applet.png") ++ @image = Gtk::Image.new(nil) ++ evbox.signal_connect('expose-event') { |w,e| on_expose(w,e) } ++ evbox.add(@image) + + tooltips = Gtk::Tooltips.new + tooltips.set_tip(evbox, @config.tooltip_text, nil); +@@ -622,12 +624,6 @@ + completion.insert_action_markup(i, "<b>Add menu item:</b> #{text}") + end + +- # Show/hide the border around the main UI 'button' +- +- def set_button_border +- @frame.shadow_type = @config.hide_border? ? Gtk::SHADOW_NONE : Gtk::SHADOW_OUT; +- end +- + # Accessor for the SSHMenu::ClassMapper singleton object + + def mapper +@@ -807,6 +803,19 @@ + return false + end + ++ def on_expose(widget, event) ++ if @orientation ++ newsize = widget.allocation.height ++ else ++ newsize = widget.allocation.width ++ end ++ if @size != newsize ++ @size = newsize ++ @image.set_pixbuf(@pixbuf.scale(newsize, newsize)) ++ end ++ return false ++ end ++ + # Takes a code block and schedules it to be called when option processing + # is complete + +@@ -1132,7 +1141,6 @@ + dialog_class = mapper.get_class('app.dialog.prefs') + dialog_class.new(self, @config).invoke + show_hide_text_entry +- set_button_border + end + + # Called from the SSHMenu::PrefsDialog if the user clicks on the home page +@@ -1402,21 +1410,6 @@ + return @globals['tooltip'] + end + +- # Returns true if the 'hide button border' option is enabled +- +- def hide_border? +- if opt = get('hide_border') +- return opt != 0 +- end +- return false +- end +- +- # Sets the state of the 'hide button border' option +- +- def hide_border=(val) +- set('hide_border', val ? 1 : 0) +- end +- + # Returns true if the 'tear-off menus' option is enabled + + def menus_tearoff? +@@ -1879,7 +1872,6 @@ + if @app.can_show_entry? + @config.show_entry = @chk_show_entry.active? + end +- @config.hide_border = @chk_hide_border.active? + @config.menus_tearoff = @chk_tearoff.active? + @config.menus_open_all = @chk_open_all.active? + @config.back_up_config = @chk_back_up_config.active? +@@ -1998,13 +1990,6 @@ + ) + r += 1 + +- @chk_hide_border = Gtk::CheckButton.new('hide button _border', true) +- @chk_hide_border.active = @config.hide_border? +- table.attach( +- @chk_hide_border, 0, 1, r, r+1, Gtk::EXPAND|Gtk::FILL, Gtk::FILL, 0, 0 +- ) +- r += 1 +- + @chk_open_all = Gtk::CheckButton.new( + 'include "Open all _windows" selection', true + ) +diff -ur sshmenu-3.18/sshmenu-applet sshmenu-3.18-pixmap/sshmenu-applet +--- sshmenu-3.18/sshmenu-applet 2009-08-24 10:25:06.000000000 +0200 ++++ sshmenu-3.18-pixmap/sshmenu-applet 2010-08-07 19:31:59.000000000 +0200 +@@ -15,7 +15,13 @@ + PanelApplet.main("OAFIID:GNOME_SSHMenuApplet_Factory", + "SSH Menu Applet", "0.1") do |applet, iid| + if iid == "OAFIID:GNOME_SSHMenuApplet" +- app = GnomeSSHMenu::Factory.make_app(:window => applet, :args => []) ++ if applet.orient == PanelApplet::ORIENT_UP || applet.orient == PanelApplet::ORIENT_DOWN ++ orient = 1 ++ else ++ orient = 0 ++ end ++ app = GnomeSSHMenu::Factory.make_app(:window => applet, :applet => orient, :args => []) ++ applet.set_flags PanelApplet::EXPAND_MINOR + applet.show + true + else ================================================================ Index: packages/gnome-applet-sshmenu/gnome-applet-sshmenu-undebianize.patch diff -u /dev/null packages/gnome-applet-sshmenu/gnome-applet-sshmenu-undebianize.patch:1.1 --- /dev/null Sat Aug 7 22:55:17 2010 +++ packages/gnome-applet-sshmenu/gnome-applet-sshmenu-undebianize.patch Sat Aug 7 22:55:12 2010 @@ -0,0 +1,59 @@ +diff -ur sshmenu-3.18/lib/gnome-sshmenu.rb sshmenu-3.18-undebian/lib/gnome-sshmenu.rb +--- sshmenu-3.18/lib/gnome-sshmenu.rb 2009-08-24 10:25:06.000000000 +0200 ++++ sshmenu-3.18-undebian/lib/gnome-sshmenu.rb 2010-08-07 22:05:34.055033116 +0200 +@@ -138,22 +138,6 @@ + return need_sep + end + +- # Debian's 'popcon' (Popularity Contest) normally reports the sshmenu-gnome +- # package as 'installed but not used' since the panel applet does not +- # access /usr/bin/sshmenu-gnome. This routine updates the atime on that +- # file each time the applet starts. This functionality is completely +- # non-essential and can be safely disabled in the unlikely event that it +- # causes some problem. +- +- def appease_popcon # :nodoc: +- # update access time on a file the Debian popcon is looking at :-) +- begin +- open('/usr/bin/sshmenu-gnome') { |f| f.readline } +- rescue Exception +- end +- super +- end +- + end + + ############################################################################ +diff -ur sshmenu-3.18/lib/sshmenu.rb sshmenu-3.18-undebian/lib/sshmenu.rb +--- sshmenu-3.18/lib/sshmenu.rb 2009-08-24 10:25:06.000000000 +0200 ++++ sshmenu-3.18-undebian/lib/sshmenu.rb 2010-08-07 22:05:48.255035867 +0200 +@@ -369,8 +369,6 @@ + # For multi-DISPLAY setups + @@display = evbox.screen + ENV['DISPLAY'] = @@display.display_name +- +- appease_popcon + end + + # Build a text entry box with resize handle for display next to the main +@@ -1177,20 +1175,6 @@ + puts message + end + +- # Debian's 'popcon' (Popularity Contest) normally reports the sshmenu +- # package as 'installed but not used' since the panel applet does not +- # access /usr/bin/sshmenu. This routine updates the atime on that file +- # each time the applet starts. This functionality is completely +- # non-essential and can be safely disabled in the unlikely event that it +- # causes some problem. +- +- def appease_popcon # :nodoc: +- begin +- open('/usr/bin/sshmenu') { |f| f.readline } +- rescue Exception +- end +- end +- + end + + ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/gnome-applet-sshmenu/gnome-applet-sshmenu.spec?r1=1.1&r2=1.2&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
