Mercurial > mplayer.hg
annotate gui/mplayer/gtk/gtk_menu.h @ 32979:4905f5a87357
Replace some awkward and unnecessary usages of strlen().
1. A string length of zero or greater than zero can be determined by checking
the first byte.
2. Leave it to strdup() to determine the length and to do allocation for a
string that is to be copied.
3. If neither the string length nor the index variable is altered in a loop,
string[index] (!= 0) is the condition to go with.
author | ib |
---|---|
date | Thu, 10 Mar 2011 14:20:36 +0000 |
parents | 704903d34069 |
children |
rev | line source |
---|---|
30531
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
1 /* |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
2 * This file is part of MPlayer. |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
3 * |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
7 * (at your option) any later version. |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
8 * |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
12 * GNU General Public License for more details. |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
13 * |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
17 */ |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
18 |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
19 #ifndef MPLAYER_GUI_MENU_H |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
20 #define MPLAYER_GUI_MENU_H |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
21 |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
22 #include <gtk/gtk.h> |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
23 |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
24 extern GtkWidget * DVDSubMenu; |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
25 |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
26 GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu, const char * label, int Number ); |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
27 GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget * Menu, const char * label ); |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
28 GtkWidget * AddSeparator( GtkWidget * Menu ); |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
29 GtkWidget * create_PopUpMenu( void ); |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
30 |
704903d34069
Rename gui/mplayer/gtk/menu.[ch] --> gui/mplayer/gtk/gtkmenu.[ch].
diego
parents:
diff
changeset
|
31 #endif /* MPLAYER_GUI_MENU_H */ |