mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-22 20:01:20 +00:00
Centralize the name of the updater application in AppInfo.h
This commit is contained in:
parent
38c9cd9b41
commit
7597dee64a
4 changed files with 13 additions and 6 deletions
|
@ -40,6 +40,7 @@ if (WIN32)
|
|||
endif()
|
||||
|
||||
set (HEADERS
|
||||
AppInfo.h
|
||||
DirIterator.h
|
||||
FileOps.h
|
||||
Log.h
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
#include "UpdateDialogAscii.h"
|
||||
|
||||
#include "AppInfo.h"
|
||||
#include "ProcessUtils.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
const char* introMessage =
|
||||
"Mendeley Updater (ASCII-art edition)\n"
|
||||
"%s (ASCII-art edition)\n"
|
||||
"====================================\n"
|
||||
"\n"
|
||||
"We have a nice graphical interface for the Mendeley Updater, but unfortunately\n"
|
||||
"We have a nice graphical interface for the %s, but unfortunately\n"
|
||||
"we can't show it to you :(\n"
|
||||
"\n"
|
||||
"You can fix this by installing the GTK 2 libraries.\n\n"
|
||||
|
@ -17,13 +18,16 @@ void UpdateDialogAscii::init()
|
|||
{
|
||||
const char* path = "/tmp/update-progress";
|
||||
m_output.open(path);
|
||||
m_output << introMessage;
|
||||
|
||||
char message[4096];
|
||||
sprintf(message,introMessage,AppInfo::name().c_str());
|
||||
m_output << message;
|
||||
|
||||
std::string command = "xterm";
|
||||
std::list<std::string> args;
|
||||
args.push_back("-hold");
|
||||
args.push_back("-T");
|
||||
args.push_back("Mendeley Updater");
|
||||
args.push_back(AppInfo::name());
|
||||
args.push_back("-e");
|
||||
args.push_back("tail");
|
||||
args.push_back("-n+1");
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "UpdateDialogGtk.h"
|
||||
|
||||
#include "AppInfo.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
@ -42,7 +43,7 @@ void UpdateDialogGtk::init(int argc, char** argv)
|
|||
gtk_init(&argc,&argv);
|
||||
|
||||
m_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title(GTK_WINDOW(m_window),"Mendeley Updater");
|
||||
gtk_window_set_title(GTK_WINDOW(m_window),AppInfo::name().c_str());
|
||||
gtk_window_set_resizable(GTK_WINDOW(m_window),false);
|
||||
|
||||
m_progressLabel = gtk_label_new("Installing Updates");
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "UpdateDialogWin32.h"
|
||||
|
||||
#include "AppInfo.h"
|
||||
#include "Log.h"
|
||||
|
||||
// enable themed controls
|
||||
|
@ -90,7 +91,7 @@ void UpdateDialogWin32::init()
|
|||
DWORD style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
|
||||
m_window.CreateEx(0 /* dwExStyle */,
|
||||
updateDialogClassName /* class name */,
|
||||
"Mendeley Updater",
|
||||
AppInfo::name(),
|
||||
style,
|
||||
0, 0, width, height,
|
||||
0 /* parent */, 0 /* menu */, 0 /* reserved */);
|
||||
|
|
Loading…
Reference in a new issue