After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 494031 - Use GtkUIManager i.s.o. deprecated GnomeUIInfo
Use GtkUIManager i.s.o. deprecated GnomeUIInfo
Status: RESOLVED FIXED
Product: gnome-media
Classification: Deprecated
Component: gnome-volume-control
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome media maintainers
gnome media maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-06 06:46 UTC by Jaap A. Haitsma
Modified: 2008-03-24 15:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch removing use of deprecated libgnomeui and deprecated icons (53.86 KB, patch)
2008-03-22 22:31 UTC, Jaap A. Haitsma
none Details | Review
icons (2.84 KB, application/x-gzip)
2008-03-22 22:35 UTC, Jaap A. Haitsma
  Details
Use GtkUIManager (48.86 KB, patch)
2008-03-23 09:30 UTC, Craig Keogh
none Details | Review
Updated patch containing missing xml file and the height gconf fix (54.55 KB, patch)
2008-03-23 13:45 UTC, Jaap A. Haitsma
committed Details | Review
Patch removing prototypes of static functions and uses G_DEFINE_TYPE for preferences as well (43.10 KB, patch)
2008-03-24 12:58 UTC, Jaap A. Haitsma
rejected Details | Review
The G_DEFINE_TYPE part (2.47 KB, patch)
2008-03-24 15:37 UTC, Jaap A. Haitsma
committed Details | Review

Description Jaap A. Haitsma 2007-11-06 06:46:24 UTC
libgnomeui will be deprecated
Comment 1 Jaap A. Haitsma 2008-03-22 22:31:52 UTC
Created attachment 107837 [details] [review]
Patch removing use of deprecated libgnomeui and deprecated icons

Patch also makes the icons themeable
Comment 2 Jaap A. Haitsma 2008-03-22 22:35:44 UTC
Created attachment 107838 [details]
icons

Untar this in the gst-mixer directory and add the files to SVN
Comment 3 Jaap A. Haitsma 2008-03-22 22:38:22 UTC
Committing this patch will also solve bug 310883
Comment 4 Marc-Andre Lureau 2008-03-23 01:04:08 UTC
rock! I'll review the patch ASAP
Comment 5 Marc-Andre Lureau 2008-03-23 01:18:42 UTC
I again, I am missing the XML files! Thanks
Comment 6 Craig Keogh 2008-03-23 09:30:22 UTC
Created attachment 107855 [details] [review]
Use GtkUIManager

Crap, I was working on this bug at the same time, due to the gnome-love keyword.
Lot of the code is similar to Jaap's, coincidentally.
Comment 7 Marc-Andre Lureau 2008-03-23 12:12:28 UTC
(In reply to comment #6)
> Created an attachment (id=107855) [edit]
> Use GtkUIManager
> 
> Crap, I was working on this bug at the same time, due to the gnome-love
> keyword.
> Lot of the code is similar to Jaap's, coincidentally.
> 

oooh, guys...! it's a shame that you did not say that you were working on this, both of you.. given that those two patches are significantly big! It makes my maintainer work more difficult, what I am suppose to do..?

Craig, can you point out what is missing in Jaap code?
Jaap, can you point out what is missing in Craig code?

It would be much better to do several patches, ex:

1a. G_DEFINE_TYPEs..
1b. add missing dependencies in configure
2a. GnomeApp->GtkWindow
2b. ->GtkStatusBar
3. icons
4. rewrite callbacks to get rid of casts
5. improve about dialog
7. UIInfo->UIManager
8. add missing license in header
...

Using a distributed version control make that easy, and we could pick/compare patch easily.

Or please, found a solution to this dilemna :)

Thanks to both of you anyway, it's all for the best!

Comment 8 Craig Keogh 2008-03-23 13:17:27 UTC
I wasn't sure if I would finish the patch, so I didn't want to announce I was working on it. It just happened I did finish it.

Jaap's has improved the Icon code and About box code, I didn't look at that. Jaap's uses a menu place holder "/MainMenu/File/FileChangeDevice/Devices Placeholder" , which shouldn't be necessary.

In Jaap's patch, the line:
gconf_client_get_int (win->client,PREF_UI_WINDOW_HEIGHT, NULL);
should be:
height = gconf_client_get_int (win->client,PREF_UI_WINDOW_HEIGHT, NULL);
(this was a bug in the old code too)

My code makes gnome_volume_control_window a little more 'GObject' like.
Comment 9 Jaap A. Haitsma 2008-03-23 13:45:00 UTC
Created attachment 107862 [details] [review]
Updated patch containing missing xml file and the height gconf fix

Oops forgot to include the xml file.

Indeed a pain that we don't have distributed version control system, and that by accident two people are working on the same thing.

Breaking the patches up will generate quite some extra work. Can I suggest we apply my patch (because it's the largest). After that we make a patch on that code with the improvements of Craig?

What do you think about that?
Comment 10 Marc-Andre Lureau 2008-03-23 14:06:09 UTC
Jaap, Craig, thanks for discussing the merge.

(In reply to comment #9)
> Breaking the patches up will generate quite some extra work. Can I suggest we
> apply my patch (because it's the largest). After that we make a patch on that
> code with the improvements of Craig?

Ok for me. What about you Craig?

Just one comment about the xml file, wouldn't it be more clever to have it inlined? (less files, less changes...)? 
Comment 11 Jaap A. Haitsma 2008-03-23 18:57:32 UTC
(In reply to comment #10)
> 
> Just one comment about the xml file, wouldn't it be more clever to have it
> inlined? (less files, less changes...)? 
> 
Most GNOME apps use the xml file, but I can inline it if you prefer. Let me know

Craig if you also agree I have SVN access, so I can make the changes


Comment 12 Marc-Andre Lureau 2008-03-23 21:40:44 UTC
(In reply to comment #11)
> Most GNOME apps use the xml file, but I can inline it if you prefer. Let me
> know

fair enough.


Comment 13 Craig Keogh 2008-03-24 00:46:33 UTC
> Ok for me. What about you Craig?

Agree, review/commit Jaap's patch - it is better and has more features. I'll suggest more improvements if I see them.
Comment 14 Marc-Andre Lureau 2008-03-24 01:20:35 UTC
Jaap, go ahead.
Comment 15 Jaap A. Haitsma 2008-03-24 09:57:51 UTC
2008-03-24  Jaap Haitsma  <jaap@haitsma.org>

	reviewed by: Marc-Andre Lureau

	* configure.in:
	* gst-mixer/Makefile.am:
	* gst-mixer/gnome-volume-control-ui.xml:
	* gst-mixer/icons/16x16/Makefile.am:
	* gst-mixer/icons/16x16/devices/Makefile.am:
	* gst-mixer/icons/16x16/status/Makefile.am:
	* gst-mixer/icons/Makefile.am:
	* gst-mixer/pixmaps/Makefile.am:
	* gst-mixer/src/Makefile.am:
	* gst-mixer/src/button.c: (gnome_volume_control_button_class_init),
	(gnome_volume_control_button_init),
	(gnome_volume_control_button_dispose),
	(gnome_volume_control_button_new),
	(gnome_volume_control_button_clicked),
	(gnome_volume_control_button_mouseover),
	(gnome_volume_control_button_mouseout):
	* gst-mixer/src/button.h:
	* gst-mixer/src/element.c:
	(gnome_volume_control_element_class_init),
	(gnome_volume_control_element_init),
	(gnome_volume_control_element_new),
	(gnome_volume_control_element_dispose),
	(gnome_volume_control_element_change):
	* gst-mixer/src/element.h:
	* gst-mixer/src/main.c: (main):
	* gst-mixer/src/misc.c:
	* gst-mixer/src/preferences.c:
	* gst-mixer/src/stock.h:
	* gst-mixer/src/track.c: (gnome_volume_control_track_add_title),
	(gnome_volume_control_track_put_switch),
	(gnome_volume_control_track_add_playback),
	(gnome_volume_control_track_add_recording),
	(gnome_volume_control_track_add_switch),
	(gnome_volume_control_track_add_option):
	* gst-mixer/src/track.h:
	* gst-mixer/src/volume.c: (gnome_volume_control_volume_class_init),
	(gnome_volume_control_volume_init), (cb_mouseover), (cb_mouseout),
	(get_button), (gnome_volume_control_volume_new),
	(gnome_volume_control_volume_dispose),
	(gnome_volume_control_volume_size_alloc),
	(gnome_volume_control_volume_expose):
	* gst-mixer/src/volume.h:
	* gst-mixer/src/window.c: (menu_item_select_cb),
	(menu_item_deselect_cb), (connect_proxy_cb), (disconnect_proxy_cb),
	(cb_change), (cb_exit), (cb_preferences_destroy), (cb_preferences),
	(open_uri), (cb_help), (cb_about),
	(gnome_volume_control_window_dispose),
	(gnome_volume_control_window_class_init),
	(gnome_volume_control_window_init),
	(gnome_volume_control_window_new):
	* gst-mixer/src/window.h:
	Use GtkUIManager i.s.o. deprecated libgnomeui
	Remove libgnomeui as a dependency
	Use tango icons if possible and make all icons themeable
	Install deprecated icons from the application itself. Now we just need
	a pixel pusher to make us some nice tango icons for the remaining icons
	Use G_DEFINE_TYPE macro for our own types
	Fixes bug #494031 and bug #310883

Commited

Let's attach the improvements of Craig here as well
Comment 16 Jaap A. Haitsma 2008-03-24 12:58:43 UTC
Created attachment 107916 [details] [review]
Patch removing prototypes of static functions and uses G_DEFINE_TYPE for preferences as well

Some other cleanups:
1) Reshuffling of functions such that prototypes are not necessary anymore for static functions
2) Use G_DEFINE_TYPE for preferences
3) Some other small cleanups

Can I apply?
Comment 17 Marc-Andre Lureau 2008-03-24 13:15:15 UTC
(In reply to comment #16)
> Created an attachment (id=107916) [edit]
> Patch removing prototypes of static functions and uses G_DEFINE_TYPE for
> preferences as well
> 
> Some other cleanups:
> 1) Reshuffling of functions such that prototypes are not necessary anymore for
> static functions
> 2) Use G_DEFINE_TYPE for preferences
> 3) Some other small cleanups
> 
> Can I apply?
> 

Please avoid reshuffling, that makes "blame" difficult to read :) Furthermore, prototypes are ok (even necessary in some C standard)
Comment 18 Jaap A. Haitsma 2008-03-24 13:39:42 UTC
Quite some GNOME programs use this no prototype for static functions. Furthermore programs that do it have it usually not for all functions because people forget about it when they add a new function.

I don't see the problem with reshuffling and blame so much. In the end it's not about blaming but about fixing ;-) And I'll be happy to help fixing.


Comment 19 Marc-Andre Lureau 2008-03-24 13:44:40 UTC
(In reply to comment #18)
> Quite some GNOME programs use this no prototype for static functions.
> Furthermore programs that do it have it usually not for all functions because
> people forget about it when they add a new function.
> 
> I don't see the problem with reshuffling and blame so much. In the end it's not
> about blaming but about fixing ;-) And I'll be happy to help fixing.
> 

Prototypes are not necessary, right. But please avoid reshuffling. Only when necessary, and here, I don't think we should. Reshuffling does not fix anything.
Comment 20 Jaap A. Haitsma 2008-03-24 13:48:12 UTC
OK, Can I commit the G_DEFINE_TYPE part in the preferences? This way that will be consistent with the rest again
Comment 21 Marc-Andre Lureau 2008-03-24 14:06:51 UTC
(In reply to comment #20)
> OK, Can I commit the G_DEFINE_TYPE part in the preferences? This way that will
> be consistent with the rest again
> 

Can you attach the patch please?
Comment 22 Jaap A. Haitsma 2008-03-24 15:37:32 UTC
Created attachment 107925 [details] [review]
The G_DEFINE_TYPE part
Comment 23 Marc-Andre Lureau 2008-03-24 15:54:56 UTC
(In reply to comment #22)
> Created an attachment (id=107925) [edit]
> The G_DEFINE_TYPE part
> 

looks ok to me! thanks for the update, please apply
Comment 24 Jaap A. Haitsma 2008-03-24 15:59:44 UTC
Commited