~blackskad/gnomeradio/dev-vol-button

« back to all changes in this revision

Viewing changes to src/gui.c

  • Committer: mfcn
  • Date: 2006-11-05 21:38:17 UTC
  • Revision ID: svn-v3-trunk0:ba97a3d1-ec25-0410-b1c6-e06ad936ea6c:trunk:149
        * .cvsignore:
        * COPYING:
        * Makefile.am:
        * autogen.sh:
        * configure.in:
        * data/.cvsignore:
        * data/Makefile.am:
        * data/example.lircrc:
        * data/gnomeradio.desktop.in:
        * data/gnomeradio.schemas.in:
        * data/icons/.cvsignore:
        * data/icons/16x16/.cvsignore:
        * data/icons/16x16/Makefile.am:
        * data/icons/16x16/gnomeradio.png:
        * data/icons/22x22/.cvsignore:
        * data/icons/22x22/Makefile.am:
        * data/icons/22x22/gnomeradio.png:
        * data/icons/24x24/.cvsignore:
        * data/icons/24x24/Makefile.am:
        * data/icons/24x24/gnomeradio.png:
        * data/icons/32x32/.cvsignore:
        * data/icons/32x32/Makefile.am:
        * data/icons/32x32/gnomeradio.png:
        * data/icons/48x48/.cvsignore:
        * data/icons/48x48/Makefile.am:
        * data/icons/48x48/gnomeradio.png:
        * data/icons/Makefile.am:
        * data/icons/scalable/.cvsignore:
        * data/icons/scalable/Makefile.am:
        * data/icons/scalable/gnomeradio.svg:
        * data/pixmaps/.cvsignore:
        * data/pixmaps/digits.xpm:
        * data/pixmaps/freq_down.xpm:
        * data/pixmaps/freq_up.xpm:
        * data/pixmaps/signal.xpm:
        * data/pixmaps/stereo.xpm:
        * data/pixmaps/vol_down.xpm:
        * data/pixmaps/vol_up.xpm:
        * help/.cvsignore:
        * help/C/figures/freq-controls.png:
        * help/C/figures/misc-controls.png:
        * help/C/figures/presets-box.png:
        * help/C/figures/recording-general.png:
        * help/C/figures/recording-mp3.png:
        * help/C/figures/recording-wav.png:
        * help/C/figures/recording_status.png:
        * help/C/figures/settings-misc.png:
        * help/C/figures/settings-presets.png:
        * help/C/figures/status-window.png:
        * help/C/figures/volume-controls.png:
        * help/C/gnomeradio.xml:
        * help/C/legal.xml:
        * help/Makefile.am:
        * help/gnomeradio.omf.in:
        * src/.cvsignore:
        Added
        * docs/C/Makefile.am:
        * docs/C/figures/freq-controls.png:
        * docs/C/figures/misc-controls.png:
        * docs/C/figures/presets-box.png:
        * docs/C/figures/recording-general.png:
        * docs/C/figures/recording-mp3.png:
        * docs/C/figures/recording-wav.png:
        * docs/C/figures/recording_status.png:
        * docs/C/figures/settings-misc.png:
        * docs/C/figures/settings-presets.png:
        * docs/C/figures/status-window.png:
        * docs/C/figures/volume-controls.png:
        * docs/C/gnomeradio-C.omf:
        * docs/C/gnomeradio.xml:
        * docs/C/legal.xml:
        * docs/Makefile.am:
        * example.lircrc:
        * omf.make:
        * pixmaps/Makefile.am:
        * pixmaps/digits.xpm:
        * pixmaps/freq_down.xpm:
        * pixmaps/freq_up.xpm:
        * pixmaps/gnomeradio.png:
        * pixmaps/radio.png:
        * pixmaps/radio.xpm:
        * pixmaps/signal.xpm:
        * pixmaps/stereo.xpm:
        * pixmaps/vol_down.xpm:
        * pixmaps/vol_up.xpm:
        * xmldocs.make:
        Removed
        * po/POTFILES.in:
        * src/gui.c: (about_button_clicked_cb), (main):
        * src/trayicon.c: (create_tray_icon):
        Updated

        * Migration to gnome-doc-utils; make distcheck works now;
        * Added new icons from Josef Vybíra; thanks - you rock!
        * updated source to used these icons

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "lirc.h"
34
34
#include "prefs.h"
35
35
#include "record.h"
36
 
#include "../pixmaps/digits.xpm"
37
 
#include "../pixmaps/signal.xpm"
38
 
#include "../pixmaps/stereo.xpm"
39
 
#include "../pixmaps/freq_up.xpm"
40
 
#include "../pixmaps/freq_down.xpm"
41
 
#include "../pixmaps/radio.xpm"
 
36
#include "../data/pixmaps/digits.xpm"
 
37
#include "../data/pixmaps/signal.xpm"
 
38
#include "../data/pixmaps/stereo.xpm"
 
39
#include "../data/pixmaps/freq_up.xpm"
 
40
#include "../data/pixmaps/freq_down.xpm"
42
41
 
43
42
#define DIGIT_WIDTH 20
44
43
#define DIGIT_HEIGTH 30
711
710
static void about_button_clicked_cb(GtkButton *button, gpointer data)
712
711
{
713
712
        GdkPixbuf *app_icon;
 
713
        GtkIconTheme *icontheme;
714
714
        static GtkWidget *about;
715
715
        const char *authors[] = {"Jörgen Scheibengruber <mfcn@gmx.de>", NULL};
716
716
        char *text;
723
723
                gtk_window_present(GTK_WINDOW(about));
724
724
                return;
725
725
        }
726
 
 
727
 
        app_icon = gdk_pixbuf_new_from_xpm_data((const char**)radio_xpm);
 
726
        icontheme = gtk_icon_theme_get_default();
 
727
        app_icon = gtk_icon_theme_load_icon(icontheme, "gnomeradio", 48, 0, NULL);
728
728
 
729
729
#ifdef HAVE_LIRC        
730
730
        text =_("Gnomeradio is a FM-Tuner application for the GNOME desktop. "
743
743
 
744
744
        gtk_widget_show(about);
745
745
        g_object_add_weak_pointer(G_OBJECT(about), (gpointer)&about);
 
746
        g_object_add_weak_pointer(G_OBJECT(about), (gpointer)&app_icon);
746
747
}
747
748
 
748
749
static gint delete_event_cb(GtkWidget* window, GdkEventAny* e, gpointer data)
1051
1052
int main(int argc, char* argv[])
1052
1053
{
1053
1054
        GtkWidget* app;
1054
 
        GList *icons, *ptr;
1055
 
        GdkPixbuf *app_icon;
 
1055
        GList *ptr;
1056
1056
        GnomeClient *client;
1057
1057
        GError *err = NULL;
1058
1058
        int redraw_timeout_id;
1084
1084
                                        GNOME_PARAM_GOPTION_CONTEXT, ctx,
1085
1085
#endif
1086
1086
                                        NULL);
1087
 
        
1088
 
        app_icon = gdk_pixbuf_new_from_xpm_data((const char**)radio_xpm);
1089
 
        icons = g_list_append(NULL, (gpointer)app_icon);
1090
 
        gtk_window_set_default_icon_list(icons);
1091
 
        
 
1087
        gtk_window_set_default_icon_name("gnomradio");
1092
1088
        /* Main app */
1093
1089
        app = gnome_radio_gui();
1094
1090