File: browsers.cpp

package info (click to toggle)
jd 1:2.7.0~beta100627-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,820 kB
  • ctags: 9,339
  • sloc: cpp: 70,318; makefile: 689; sh: 65
file content (53 lines) | stat: -rw-r--r-- 1,600 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// ライセンス: GPL2

#include "browsers.h"

enum
{
    MAX_TEXT = 512,
#ifdef _WIN32
    BROWSER_NUM = 5
#else
    BROWSER_NUM = 11
#endif
};

namespace CORE
{
    char browsers[ BROWSER_NUM ][ 2 ][ MAX_TEXT ]={

        { "ユーザ設定", "" },
#ifdef _WIN32
        { "ie",    "\"C:/Program Files/Internet Explorer/iexplore.exe\" \"%LINK\"" },
        { "firefox 1.5/2.0/3.0 以降", "\"C:/Program Files/Mozilla Firefox/firefox.exe\" \"%LINK\"" },
        { "firefox 1.0*", "\"C:/Program Files/Mozilla Firefox/firefox.exe\" -remote \"openURL(%LINK,new-tab)\"" },
        { "opera 9.*",    "\"C:/Program Files/Opera/opera.exe\" \"%LINK\"" }
#else
        { "標準ブラウザ(xdg-open)",    "xdg-open \"%LINK\"" },
        { "Debian Sensible ブラウザ (システム設定依存)", "sensible-browser \"%LINK\"" },
        { "iceweasel", "iceweasel \"%LINK\"" },
        { "Firefox", "firefox \"%LINK\"" },
        { "iceape", "iceape \"%LINK\"" },
        { "konqeror", "konqeror \"%LINK\"" },
        { "w3m", "w3m \"%LINK\"" },
        { "風博士", "kazehakase \"%LINK\"" },
        { "opera",    "opera -remote \"openURL(%LINK,new-tab)\"" },
        { "chrome",    "google-chrome \"%LINK\"" }

#endif
    };

    const std::string get_browser_label( const int num ){

        if( num >= BROWSER_NUM ) return std::string();
        return browsers[ num ][ 0 ];
    }

    const std::string get_browser_name( const int num ){

        if( num >= BROWSER_NUM ) return std::string();
        return browsers[ num ][ 1 ];
    }

    const int get_browser_number(){ return BROWSER_NUM; }
}